rust/fpnum/src/lib.rs
changeset 14199 a4c17cfaa4c9
parent 14161 3078123e84ea
child 14228 bb2f301d4fe0
equal deleted inserted replaced
14198:a4dd3d307115 14199:a4c17cfaa4c9
   362             value: self.y_value,
   362             value: self.y_value,
   363         }
   363         }
   364     }
   364     }
   365 
   365 
   366     #[inline]
   366     #[inline]
       
   367     pub fn is_zero(&self) -> bool {
       
   368         self.x().is_zero() && self.y().is_zero()
       
   369     }
       
   370 
       
   371     #[inline]
   367     pub fn max_norm(&self) -> FPNum {
   372     pub fn max_norm(&self) -> FPNum {
   368         std::cmp::max(self.x().abs(), self.y().abs())
   373         std::cmp::max(self.x().abs(), self.y().abs())
   369     }
   374     }
   370 
   375 
   371     #[inline]
   376     #[inline]