1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/math/big/min_max.v

27 lines
375 B
V

module big
[inline]
fn imax(a int, b int) int {
return if a > b { a } else { b }
}
[inline]
fn imin(a int, b int) int {
return if a < b { a } else { b }
}
[inline]
fn umax(a u32, b u32) u32 {
return if a > b { a } else { b }
}
[inline]
fn umin(a u32, b u32) u32 {
return if a < b { a } else { b }
}
[inline]
fn iabs(v int) int {
return if v > 0 { v } else { -v }
}