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