forked from Mirrors/openclonk
Add mathematical modulo helper function Mod(a, b)
parent
60e9383a42
commit
dd48a759d7
|
@ -160,4 +160,10 @@ global func GetSurfaceVector(int x, int y)
|
||||||
}
|
}
|
||||||
|
|
||||||
return normal;
|
return normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Proper modulo operation.
|
||||||
|
global func Mod(a, b)
|
||||||
|
{
|
||||||
|
return (a % b + b) % b;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue