Skip to content

Commit d2a893d

Browse files
committed
wrap: fix divide by zero error
1 parent 83d35c5 commit d2a893d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Math/wrap.gml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ var _max = argument[2];
99

1010
var _range = _max - _min + 1;
1111

12+
if (_range + _min == 0)
13+
return 0;
14+
1215
while (_value < _min)
1316
_value += _range;
1417

0 commit comments

Comments
 (0)