mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-21 00:46:47 +00:00
Correct assignment
This commit is contained in:
+2
-2
@@ -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)
|
floor_divmod :: #force_inline proc "contextless" (x, y: $T) -> (div, mod: T)
|
||||||
where intrinsics.type_is_integer(T) {
|
where intrinsics.type_is_integer(T) {
|
||||||
div := x / y
|
div = x / y
|
||||||
mod := x % y
|
mod = x % y
|
||||||
if (div > 0 && y < 0) || (mod < 0 && y > 0) {
|
if (div > 0 && y < 0) || (mod < 0 && y > 0) {
|
||||||
div -= 1
|
div -= 1
|
||||||
mod += y
|
mod += y
|
||||||
|
|||||||
Reference in New Issue
Block a user