Module tiny_skia_path::floating_point

source ยท

Structsยง

Constantsยง

Traitsยง

Functionsยง

  • 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.)