Skip to content

Commit

Permalink
Fix rounding mode of script api, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
brzGatsu committed May 12, 2024
1 parent c9b1f92 commit 0dcaa3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Sephrasto/Hilfsmethoden.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def writeGuard(obj):
"max" : max,
"min" : min,
"clamp" : lambda val, minimum, maximum: max(min(val, maximum), minimum),
"round" : round,
"round" : lambda val: (1 if val >= 0 else -1) * int(abs(val) + 0.5), # pythons "round" rounds half to even, we need half up
"roundDown" : lambda val: int(val),
"roundUp" : lambda val: math.ceil(val) if val >= 0 else math.floor(val),
"sum" : sum
Expand Down
2 changes: 1 addition & 1 deletion src/Sephrasto/Version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_sephrasto_version_major = 5
_sephrasto_version_minor = 0
_sephrasto_version_build = 1
_sephrasto_version_build = 2

_sephrasto_version = [_sephrasto_version_major, _sephrasto_version_minor, _sephrasto_version_build, 0]

Expand Down

0 comments on commit 0dcaa3a

Please sign in to comment.