Skip to main content

round_fixed

Function round_fixed 

Source
fn round_fixed(value: Fixed) -> Fixed
Expand description

Rounds to a whole unit, halves away from zero, as FreeType’s FT_RoundFix does.

A value from 32767.5 up rounds to 32768, which Fixed can’t hold, so it saturates to Fixed::MAX. FreeType keeps 32768 in a 64-bit value; both give 32768 once rounded up to whole units.