Function |to_u32

conv/f64::|to_u32


Usage

|to_u32(value, pos_infinity, neg_infinity, nan)

Parameters

↳ value: f64
↳ pos_infinity: u32
↳ neg_infinity: u32
↳ nan: u32

Return

↴ u32


Turns f64 into u32.

f64 is truncated to fit into u32, and in case floating-point value does not describe a real number:

  • pos_infinity is used when f64 is a positive infinity,
  • neg_infinity is used when f64 is a negative infinity,
  • nan is used when f64 is not a number.