mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-05 10:28:27 +00:00
Disallow Scalar
value being NaN
This commit is contained in:
parent
1da2844030
commit
02e1ae05f4
@ -7,6 +7,10 @@ pub struct Scalar {
|
||||
|
||||
impl Scalar {
|
||||
pub fn new(value: f64) -> Self {
|
||||
if value.is_nan() {
|
||||
panic!("`Scalar` value must not be NaN");
|
||||
}
|
||||
|
||||
Self { value }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user