Files
wehub-resource-sync fc00954168
Build / build (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:49:10 +08:00

31 lines
394 B
OpenEdge ABL

fun Min(x: int, y: int): int{
if (x < y)
return x;
else
return y;
}
fun Max(x: int, y: int): int{
if (x > y)
return x;
else
return y;
}
fun BitwiseAnd(x: int, y: int): int {
var n: int;
var r: int;
n = 1;
while (x > 0 && y > 0) {
if (x % 2 > 0 && y % 2 > 0) {
r = r + n;
}
x = x / 2;
y = y / 2;
n = n * 2;
}
return r;
}