mirror of
https://github.com/rm-dr/daisy
synced 2025-07-02 08:39:42 -07:00
Fixed mod bug
This commit is contained in:
@ -244,7 +244,7 @@ impl Rem<FloatBase> for FloatBase {
|
||||
(!modulus.fract().unwrap().is_zero())
|
||||
} { panic!() }
|
||||
|
||||
FloatBase{val : self.val.fract() % modulus.val.fract()}
|
||||
FloatBase{val : self.val.trunc() % modulus.val.trunc()}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ impl Scalar {
|
||||
pub fn is_nan(&self) -> bool {
|
||||
match self {
|
||||
Scalar::Float {v} => {v.val.is_nan()},
|
||||
Scalar::Rational {..} => {panic!()}
|
||||
Scalar::Rational {..} => {false}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user