Function |to_u128

conv/f32::|to_u128


Usage

|to_u128(value, pos_infinity, neg_infinity, nan)

Parameters

↳ value: f32
↳ pos_infinity: u128
↳ neg_infinity: u128
↳ nan: u128

Return

u128


Turns f32 into u128.

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

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