rust/fpnum/src/lib.rs
changeset 14199 a4c17cfaa4c9
parent 14161 3078123e84ea
child 14228 bb2f301d4fe0
--- a/rust/fpnum/src/lib.rs	Thu Nov 08 22:00:43 2018 +0100
+++ b/rust/fpnum/src/lib.rs	Fri Nov 09 01:05:34 2018 +0300
@@ -364,6 +364,11 @@
     }
 
     #[inline]
+    pub fn is_zero(&self) -> bool {
+        self.x().is_zero() && self.y().is_zero()
+    }
+
+    #[inline]
     pub fn max_norm(&self) -> FPNum {
         std::cmp::max(self.x().abs(), self.y().abs())
     }