Browse Source

Merge branch 'master' of https://github.com/odin-lang/Odin

gingerBill 5 years ago
parent
commit
ac709b8afb
2 changed files with 1 additions and 2 deletions
  1. 0 1
      core/math/linalg/specific.odin
  2. 1 1
      core/math/math.odin

+ 0 - 1
core/math/linalg/specific.odin

@@ -1,7 +1,6 @@
 package linalg
 package linalg
 
 
 import "core:math"
 import "core:math"
-import "intrinsics"
 
 
 
 
 // Specific
 // Specific

+ 1 - 1
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) {
 wrap :: proc(x, y: $T) -> T where intrinsics.type_is_numeric(T), !intrinsics.type_is_array(T) {
 	tmp := mod(x, y);
 	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) {
 angle_diff :: proc(a, b: $T) -> T where intrinsics.type_is_numeric(T), !intrinsics.type_is_array(T) {