Skip to main content

charge

Function charge 

Source
pub const fn charge(kind: ParticleKind) -> ElementaryCharge
Expand description

Returns the exact charge for kind.

ยงExamples

use use_particle::{ParticleKind, charge};

assert_eq!(charge(ParticleKind::Electron).thirds, -3);
assert_eq!(charge(ParticleKind::UpQuark).thirds, 2);