implement more intervals
This commit is contained in:
+1887
-1470
File diff suppressed because it is too large
Load Diff
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user