ableos/sysdata/libraries/stn/src/math.hb

7 lines
138 B
Plaintext
Raw Normal View History

2024-08-20 07:03:39 -05:00
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)
}