diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-10-30 08:52:21 +0000 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-10-30 08:52:21 +0000 |
| commit | 99520d82fd26316fc795ae524cc0dfa3477fdac8 (patch) | |
| tree | 3b99392059a143a35970ac4dedf64cf7acb7f3cb /base | |
| parent | 13ddf66cc96a50e96ce9c31875375926482b9cee (diff) | |
Add `intrinsics.constant_(floor|truncate|ceil|round)`
Diffstat (limited to 'base')
| -rw-r--r-- | base/intrinsics/intrinsics.odin | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/intrinsics/intrinsics.odin b/base/intrinsics/intrinsics.odin index 952f927bd..0274eb731 100644 --- a/base/intrinsics/intrinsics.odin +++ b/base/intrinsics/intrinsics.odin @@ -244,6 +244,11 @@ constant_utf16_cstring :: proc($literal: string) -> [^]u16 --- constant_log2 :: proc($v: $T) -> T where type_is_integer(T) --- +constant_floor :: proc($v: $T) -> T where type_is_integer(T) || type_is_float(T) --- +constant_truncate :: proc($v: $T) -> T where type_is_integer(T) || type_is_float(T) --- +constant_ceil :: proc($v: $T) -> T where type_is_integer(T) || type_is_float(T) --- +constant_round :: proc($v: $T) -> T where type_is_integer(T) || type_is_float(T) --- + // SIMD related simd_add :: proc(a, b: #simd[N]T) -> #simd[N]T --- simd_sub :: proc(a, b: #simd[N]T) -> #simd[N]T --- |