try_sqrt >= 0
This commit is contained in:
@@ -346,8 +346,8 @@ macro_rules! impl_nalgebra {
|
|||||||
#[inline]
|
#[inline]
|
||||||
fn try_sqrt(self) -> Option<Self> {
|
fn try_sqrt(self) -> Option<Self> {
|
||||||
let x = self.freeze_raw();
|
let x = self.freeze_raw();
|
||||||
if x > 0.0 {
|
if x >= 0.0 {
|
||||||
Some(<$fast_ty>::new(x.sqrt()))
|
Some(<$fast_ty>::new(x).sqrt())
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user