Function float_to_int_inner

Source
fn float_to_int_inner<F, I, FnFoo, FnOob>(
    fbits: F::Int,
    map_inbounds: FnFoo,
    out_of_bounds: FnOob,
) -> I
where F: Float, I: Int, FnFoo: FnOnce(I) -> I, FnOob: FnOnce() -> I, I::UnsignedInt: Int, F::Int: CastInto<I::UnsignedInt> + CastFrom<u32>, u32: CastFrom<F::Int>,
Expand description

Float to int conversions, generic for both signed and unsigned.

Parameters:

  • fbits: abg(f) bitcasted to an integer.
  • map_inbounds: apply this transformation to integers that are within range (add the sign back).
  • out_of_bounds: return value when out of range for I.