Skip to main content

Crate re_int

Crate re_int 

Source
Expand description

Small numeric helper traits shared across the Rerun crates.

  • SaturatingCast — cast between integer types, clamping to the target’s range.
  • UnsignedAbs — absolute value of a signed integer without wrapping or panicking.

Traits§

SaturatingCast
Cast a number to another integer type, clamping to the target’s range instead of wrapping (as) or panicking (TryFrom + unwrap).
SaturatingFrom
Build Self from Src, clamping to Self’s range instead of wrapping or panicking.
UnsignedAbs
Compute the absolute value of a signed integer without any wrapping or panicking.