FLet c represent the starting value.
If c is NaN, the result is 0.
If c > 1.0f, including INF, it is clamped to 1.0f.
If c < 0.0f, including -INF, it is clamped to 0.0f.
Convert from float scale to integer scale: c = c * (2ⁿ-1).
Convert to integer.
c = c + 0.5f.
The decimal fraction is dropped, and the remaining floating point (integral) value is converted directly to an integer.