diff --git a/src/lib.rs b/src/lib.rs index 1b269153..5f8715c1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -541,7 +541,7 @@ pub fn prepend_rotation>(m: &M, v: &V) -> M { /// use na::{BaseFloat, Rot3, Vec3}; /// /// fn main() { -/// let t = Rot3::new(Vec3::new(0.0f64, 0.0, 0.5 * BaseFloat::pi())); +/// let t = Rot3::new(Vec3::new(0.0f64, 0.0, 0.5 * ::pi())); /// let v = Vec3::new(1.0, 0.0, 0.0); /// /// let tv = na::rotate(&t, &v); @@ -562,7 +562,7 @@ pub fn rotate>(m: &M, v: &V) -> V { /// use na::{BaseFloat, Rot3, Vec3}; /// /// fn main() { -/// let t = Rot3::new(Vec3::new(0.0f64, 0.0, 0.5 * BaseFloat::pi())); +/// let t = Rot3::new(Vec3::new(0.0f64, 0.0, 0.5 * ::pi())); /// let v = Vec3::new(1.0, 0.0, 0.0); /// /// let tv = na::inv_rotate(&t, &v); diff --git a/src/structs/dmat.rs b/src/structs/dmat.rs index c7c2481a..48c7ebff 100644 --- a/src/structs/dmat.rs +++ b/src/structs/dmat.rs @@ -498,7 +498,7 @@ impl Transpose for DMat { impl + Clone> Mean> for DMat { fn mean(&self) -> DVec { let mut res: DVec = DVec::new_zeros(self.ncols); - let normalizer: N = Cast::from(1.0f64 / Cast::from(self.nrows)); + let normalizer: N = Cast::from(1.0f64 / self.nrows as f64); for i in 0..self.nrows { for j in 0..self.ncols {