From 6c7fc4212adb8233203c1731ff896971cd470490 Mon Sep 17 00:00:00 2001 From: Kevin Watters Date: Mon, 1 Jun 2020 18:44:47 -0400 Subject: [PATCH 1/2] Remove `intrinsics` import When using `linalg` with the `-vet` compiler switch, you get the warning/error: `odin/core/math/linalg/specific.odin(4:8) 'intrinsics' declared but not used` --- core/math/linalg/specific.odin | 1 - 1 file changed, 1 deletion(-) diff --git a/core/math/linalg/specific.odin b/core/math/linalg/specific.odin index d8d432494..4eca42000 100644 --- a/core/math/linalg/specific.odin +++ b/core/math/linalg/specific.odin @@ -1,7 +1,6 @@ package linalg import "core:math" -import "intrinsics" // Specific From 437d5e28cdc89596d44fea3b8a75b2a06923c65c Mon Sep 17 00:00:00 2001 From: foxnne Date: Tue, 2 Jun 2020 00:37:06 -0500 Subject: [PATCH 2/2] fix wrap in core:math --- core/math/math.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/math/math.odin b/core/math/math.odin index 86d2ca57a..b0ae373ea 100644 --- a/core/math/math.odin +++ b/core/math/math.odin @@ -116,7 +116,7 @@ unlerp :: proc{unlerp_f32, unlerp_f64}; wrap :: proc(x, y: $T) -> T where intrinsics.type_is_numeric(T), !intrinsics.type_is_array(T) { tmp := mod(x, y); - return wrap + tmp if tmp < 0 else tmp; + return y + tmp if tmp < 0 else tmp; } angle_diff :: proc(a, b: $T) -> T where intrinsics.type_is_numeric(T), !intrinsics.type_is_array(T) {