浏览代码

Correct assignment

gingerBill 3 年之前
父节点
当前提交
208f168564
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      core/math/math.odin

+ 2 - 2
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)
 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
-	mod := x % y
+	div = 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