Add mathematical modulo helper function Mod(a, b)

liquid_container^2
Lukas Werling 2016-05-01 19:25:12 +02:00
parent 60e9383a42
commit dd48a759d7
1 changed files with 7 additions and 1 deletions

View File

@ -160,4 +160,10 @@ global func GetSurfaceVector(int x, int y)
}
return normal;
}
}
// Proper modulo operation.
global func Mod(a, b)
{
return (a % b + b) % b;
}