diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2026-02-11 22:15:15 +0100 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2026-02-11 22:15:15 +0100 |
| commit | b82512b4cfca4f5e357d1510696f6665755df6f9 (patch) | |
| tree | a51072ce1c71595c0b099e3b902defe29dcf2663 | |
| parent | 43f4b2187cc362a3abba71efc73d05a085c57f04 (diff) | |
Restrict `math.wrap` to floats.
| -rw-r--r-- | core/math/math.odin | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |