ableos/sysdata/libraries/stn/src/math.hb
2024-08-20 13:03:39 +01:00

7 lines
138 B
Plaintext

abs := fn(x: int): int {
mask := x >> 31
return (x ^ mask) - mask
}
min := fn(a: int, b: int): int {
return b + (a - b & a - b >> 31)
}