Commit 7153236e authored by Maxime Perrotin's avatar Maxime Perrotin

Complete fix of range computations

parent d96693ab
......@@ -134,6 +134,9 @@ The background pattern was downloaded from www.subtlepatterns.com
Changelog
=========
2.0.29 (03/2019)
- Fix range computations and modulo operator
2.0.28 (03/2019)
- Fix saving issue on new non-taste models
......
......@@ -1642,7 +1642,14 @@ def arithmetic_expression(root, context):
# unless the left side is a universal number, in which case
# the type has to be deduced from the user of the expression
# (e.g. the left side of an assignment)
b = sorted([minL % maxR, maxL % maxR])
if minR < 0 or minL < 0:
msg = "Negative ranges and modulo don't fit well. " \
"Use with caution (check Wikipedia for details)"
warnings.append(warning(root, msg))
if minR < maxL:
b = sorted ([minL % maxR, minR])
else:
b = sorted([minL % maxR, maxL % maxR])
bounds["Min"] = b[0]
bounds["Max"] = b[1]
else:
......
......@@ -141,7 +141,7 @@ except ImportError:
__all__ = ['opengeode', 'SDL_Scene', 'SDL_View', 'parse']
__version__ = '2.0.28'
__version__ = '2.0.29'
if hasattr(sys, 'frozen'):
# Detect if we are running on Windows (py2exe-generated)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment