Function tiny_skia_path::floating_point::sign_bit_to_2s_compliment

source ยท
fn sign_bit_to_2s_compliment(x: i32) -> i32
Expand description

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