From b82512b4cfca4f5e357d1510696f6665755df6f9 Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Wed, 11 Feb 2026 22:15:15 +0100 Subject: Restrict `math.wrap` to floats. --- 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 7afb32db6..1ecb1da00 100644 --- a/core/math/math.odin +++ b/core/math/math.odin @@ -418,7 +418,7 @@ remap_clamped :: proc "contextless" (old_value, old_min, old_max, new_min, new_m } @(require_results) -wrap :: proc "contextless" (x, y: $T) -> T where intrinsics.type_is_numeric(T), !intrinsics.type_is_array(T) { +wrap :: proc "contextless" (x, y: $T) -> T where intrinsics.type_is_numeric(T), intrinsics.type_is_float(T), !intrinsics.type_is_array(T) { tmp := mod(x, y) return y + tmp if tmp < 0 else tmp } -- cgit v1.2.3