Add more interval functions

This commit is contained in:
2025-12-25 01:41:34 +00:00
parent 3b85774333
commit 00b05d6e3c
4 changed files with 1276 additions and 1280 deletions
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -1,5 +1,5 @@
//pub(crate) mod gradient;
//pub(crate) mod interval;
pub(crate) mod interval;
pub(crate) mod point;
#[derive(Debug, Clone, Copy)]
@@ -8,6 +8,7 @@ pub(crate) struct SpirVTypes {
pub void: u32,
pub float: u32,
pub bool: u32,
pub choice: u32,
pub vec2: u32,
pub vec3: u32,
pub vec4: u32,
+2
View File
@@ -477,6 +477,7 @@ impl SSATape {
let void = b.type_void();
let float = b.type_float(32);
let bool = b.type_bool();
let choice = b.type_int(2, 0);
let vec2 = b.type_vector(float, 2);
let vec3 = b.type_vector(float, 3);
let vec4 = b.type_vector(float, 4);
@@ -490,6 +491,7 @@ impl SSATape {
void,
float,
bool,
choice,
vec2,
vec3,
vec4,
+2 -2
View File
@@ -552,8 +552,8 @@ impl Interval {
pub fn clamp(self, min: Interval, max: Interval) -> Interval {
Interval::new(
self.lower.simd_clamp(min.lower, max.lower),
self.upper.simd_clamp(min.upper, max.upper),
self.lower.simd_clamp(min.lower, max.upper),
self.upper.simd_clamp(min.lower, max.upper),
)
}
}