Module tiny_skia_path::floating_point
source ยท Structsยง
- An immutable, finite
f32
. - An immutable, finite
f32
that is known to be > 0. - An immutable, finite
f32
in a 0..=1 range. - An immutable
f32
that is larger than 0 but less then 1.
Constantsยง
- FLOA
T_ ๐PI - MAX_
I32_ ๐FITS_ IN_ F32 - MIN_
I32_ ๐FITS_ IN_ F32
Traitsยง
- Custom float to integer conversion routines.
- Custom float to integer rounding routines.
Functionsยง
- f32_
as_ ๐2s_ compliment Return the float as a 2s compliment int. Just to be used to compare floats to each other or against positive float-bit-constants (like 0). This does not return the int equivalent of the float, just something cheaper for compares-only. - Convert a sign-bit int (i.e. float interpreted as int) into a 2s compliement int. This also converts -0 (0x80000000) to 0. Doing this to a float allows it to be compared using normal C operators (<, <=, etc.)