implement more intervals

This commit is contained in:
2025-12-20 23:15:37 +00:00
parent ab79317262
commit 95cb56caf5
3 changed files with 1893 additions and 1476 deletions
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,6 +1,6 @@
pub(crate) mod gradient;
pub(crate) mod point;
//pub(crate) mod gradient;
//pub(crate) mod interval;
pub(crate) mod point;
#[derive(Debug, Clone, Copy)]
pub(crate) struct SpirVTypes {
+4 -4
View File
@@ -228,11 +228,11 @@ impl Interval {
pub fn acos(self) -> Self {
let lower = (self.lower.simd_lt(VALUE_M1) | self.upper.simd_gt(VALUE_1)).select(
VALUE_NAN,
Value::from_array(self.upper.to_array().map(|f| f.asin())),
Value::from_array(self.upper.to_array().map(|f| f.acos())),
);
let upper = (self.lower.simd_lt(VALUE_M1) | self.upper.simd_gt(VALUE_1)).select(
VALUE_NAN,
Value::from_array(self.lower.to_array().map(|f| f.asin())),
Value::from_array(self.lower.to_array().map(|f| f.acos())),
);
Interval::new(lower, upper)
}
@@ -240,8 +240,8 @@ impl Interval {
/// Computes the arctangent of the interval
#[inline]
pub fn atan(self) -> Self {
let lower = Value::from_array(self.lower.to_array().map(|f| f.asin()));
let upper = Value::from_array(self.upper.to_array().map(|f| f.asin()));
let lower = Value::from_array(self.lower.to_array().map(|f| f.atan()));
let upper = Value::from_array(self.upper.to_array().map(|f| f.atan()));
Interval::new(lower, upper)
}