mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-29 01:14:40 +00:00
Correct assignment
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user