Skip to main content

antiparticle

Function antiparticle 

Source
pub const fn antiparticle(kind: ParticleKind) -> Option<ParticleKind>
Expand description

Returns the modeled antiparticle for kind.

Self-conjugate particles such as the photon return themselves.

ยงExamples

use use_particle::{ParticleKind, antiparticle};

assert_eq!(antiparticle(ParticleKind::Electron), Some(ParticleKind::Positron));
assert_eq!(antiparticle(ParticleKind::Photon), Some(ParticleKind::Photon));