eastern-flames/eastern flames/scripts/mod_negative/mod_negative.gml

10 lines
142 B
Plaintext
Raw Permalink Normal View History

2022-08-07 21:14:04 +00:00
function mod_negative(val, modval) {
if val < 1 {
while val < 0 {
val += modval;
}
return val;
} else {
return val % modval;
}
}