rust/integral-geometry/src/lib.rs
changeset 14228 bb2f301d4fe0
parent 14196 76a52e8149e3
child 14229 87f1054c2333
--- a/rust/integral-geometry/src/lib.rs	Tue Nov 13 16:54:40 2018 +0100
+++ b/rust/integral-geometry/src/lib.rs	Tue Nov 13 20:01:43 2018 +0300
@@ -1,7 +1,4 @@
-#[macro_use]
-extern crate fpnum;
-
-use fpnum::{distance, FPNum, FPPoint};
+use fpnum::{distance, FPNum, FPPoint, fp};
 use std::{
     cmp::{max, min},
     ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Range, RangeInclusive, Sub, SubAssign},
@@ -344,7 +341,7 @@
 
     #[inline]
     pub fn height(&self) -> usize {
-        (self.right() - self.left() + 1) as usize
+        (self.bottom() - self.top() + 1) as usize
     }
 
     #[inline]