diff options
| author | gingerBill <bill@gingerbill.org> | 2022-08-15 16:31:59 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-08-15 16:31:59 +0100 |
| commit | 208f168564c18b49deba1027ed5e2d96059e720d (patch) | |
| tree | 6a1a149778d5e797e19263fa60de0cd0339b9fe3 /core | |
| parent | 737bccbd5eb454fb50552339940a5dc53dbf3c82 (diff) | |
Correct assignment
Diffstat (limited to 'core')
| -rw-r--r-- | core/math/math.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/math.odin b/core/math/math.odin index 380bad6e6..5f9c737ab 100644 --- a/core/math/math.odin +++ b/core/math/math.odin @@ -623,8 +623,8 @@ divmod :: #force_inline proc "contextless" (x, y: $T) -> (div, mod: T) floor_divmod :: #force_inline proc "contextless" (x, y: $T) -> (div, mod: T) where intrinsics.type_is_integer(T) { - div := x / y - mod := x % y + div = x / y + mod = x % y if (div > 0 && y < 0) || (mod < 0 && y > 0) { div -= 1 mod += y |