From 381fdb642c1a842e497226cf49519dc709954fdc Mon Sep 17 00:00:00 2001 From: sebcrozet Date: Sun, 3 Feb 2019 10:56:30 +0100 Subject: [PATCH] Remove useless extern crate in doc-tests. --- nalgebra-glm/src/gtc/integer.rs | 2 +- nalgebra-glm/src/gtc/packing.rs | 2 +- nalgebra-glm/tests/lib.rs | 2 +- src/base/blas.rs | 6 -- src/base/indexing.rs | 2 +- src/base/norm.rs | 2 +- src/base/statistics.rs | 121 +++++++++++++++++++++- src/geometry/isometry.rs | 4 - src/geometry/isometry_construction.rs | 5 - src/geometry/orthographic.rs | 21 ---- src/geometry/quaternion.rs | 19 ---- src/geometry/quaternion_construction.rs | 14 --- src/geometry/rotation.rs | 4 - src/geometry/rotation_specialization.rs | 24 ----- src/geometry/similarity_construction.rs | 7 -- src/geometry/transform.rs | 4 - src/geometry/unit_complex.rs | 7 -- src/geometry/unit_complex_construction.rs | 7 -- tests/core/edition.rs | 2 +- tests/linalg/full_piv_lu.rs | 2 +- 20 files changed, 127 insertions(+), 130 deletions(-) diff --git a/nalgebra-glm/src/gtc/integer.rs b/nalgebra-glm/src/gtc/integer.rs index a5f1cc8f..df65843f 100644 --- a/nalgebra-glm/src/gtc/integer.rs +++ b/nalgebra-glm/src/gtc/integer.rs @@ -15,4 +15,4 @@ //pub fn uround(x: &TVec) -> TVec // where DefaultAllocator: Alloc { // unimplemented!() -//} \ No newline at end of file +//} diff --git a/nalgebra-glm/src/gtc/packing.rs b/nalgebra-glm/src/gtc/packing.rs index 414afe72..b0261239 100644 --- a/nalgebra-glm/src/gtc/packing.rs +++ b/nalgebra-glm/src/gtc/packing.rs @@ -288,4 +288,4 @@ pub fn unpackUnorm4x16(p: u64) -> Vec4 { pub fn unpackUnorm4x4(p: u16) -> Vec4 { unimplemented!() -} \ No newline at end of file +} diff --git a/nalgebra-glm/tests/lib.rs b/nalgebra-glm/tests/lib.rs index 0e76300c..ce95c64f 100644 --- a/nalgebra-glm/tests/lib.rs +++ b/nalgebra-glm/tests/lib.rs @@ -52,4 +52,4 @@ pub fn perspective_glm_nalgebra_project_same() assert_eq!(na_mat, gl_mat); assert_eq!(na_pt, gl_pt); -} \ No newline at end of file +} diff --git a/src/base/blas.rs b/src/base/blas.rs index b770aa0e..c16496d4 100644 --- a/src/base/blas.rs +++ b/src/base/blas.rs @@ -657,7 +657,6 @@ where N: Scalar + Zero + ClosedAdd + ClosedMul /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Matrix2x3, Matrix3x4, Matrix2x4}; /// let mut mat1 = Matrix2x4::identity(); /// let mat2 = Matrix2x3::new(1.0, 2.0, 3.0, @@ -790,7 +789,6 @@ where N: Scalar + Zero + ClosedAdd + ClosedMul /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Matrix3x2, Matrix3x4, Matrix2x4}; /// let mut mat1 = Matrix2x4::identity(); /// let mat2 = Matrix3x2::new(1.0, 4.0, @@ -909,7 +907,6 @@ where N: Scalar + Zero + One + ClosedAdd + ClosedMul /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{DMatrix, DVector}; /// // Note that all those would also work with statically-sized matrices. /// // We use DMatrix/DVector since that's the only case where pre-allocating the @@ -964,7 +961,6 @@ where N: Scalar + Zero + One + ClosedAdd + ClosedMul /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Matrix2, Matrix3, Matrix2x3, Vector2}; /// let mut mat = Matrix2::identity(); /// let lhs = Matrix2x3::new(1.0, 2.0, 3.0, @@ -1001,7 +997,6 @@ where N: Scalar + Zero + One + ClosedAdd + ClosedMul /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{DMatrix, DVector}; /// // Note that all those would also work with statically-sized matrices. /// // We use DMatrix/DVector since that's the only case where pre-allocating the @@ -1056,7 +1051,6 @@ where N: Scalar + Zero + One + ClosedAdd + ClosedMul /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Matrix2, Matrix3x2, Matrix3}; /// let mut mat = Matrix2::identity(); /// let rhs = Matrix3x2::new(1.0, 2.0, diff --git a/src/base/indexing.rs b/src/base/indexing.rs index 304242c4..976eef87 100644 --- a/src/base/indexing.rs +++ b/src/base/indexing.rs @@ -711,4 +711,4 @@ impl_index_pairs!{ => DimDiff where C: DimSub], } -} \ No newline at end of file +} diff --git a/src/base/norm.rs b/src/base/norm.rs index 354f2ca3..94c16e7d 100644 --- a/src/base/norm.rs +++ b/src/base/norm.rs @@ -211,4 +211,4 @@ impl> Matrix { Some(n) } } -} \ No newline at end of file +} diff --git a/src/base/statistics.rs b/src/base/statistics.rs index 106673c4..31f46d03 100644 --- a/src/base/statistics.rs +++ b/src/base/statistics.rs @@ -60,12 +60,31 @@ impl> Matrix { * */ /// The sum of all the elements of this matrix. + /// + /// # Example + /// + /// ``` + /// # use nalgebra::Matrix2x3; + /// + /// let m = Matrix2x3::new(1.0, 2.0, 3.0, + /// 4.0, 5.0, 6.0); + /// assert_eq!(m.sum(), 21.0); + /// ``` #[inline] pub fn sum(&self) -> N { self.iter().cloned().fold(N::zero(), |a, b| a + b) } /// The sum of all the rows of this matrix. + /// # Example + /// + /// ``` + /// # use nalgebra::{Matrix2x3, RowVector3}; + /// + /// let m = Matrix2x3::new(1.0, 2.0, 3.0, + /// 4.0, 5.0, 6.0); + /// assert_eq!(m.row_sum(), RowVector3::new(5.0, 7.0, 9.0)); + /// ``` #[inline] pub fn row_sum(&self) -> RowVectorN where DefaultAllocator: Allocator { @@ -73,6 +92,16 @@ impl> Matrix { } /// The sum of all the rows of this matrix. The result is transposed and returned as a column vector. + /// + /// # Example + /// + /// ``` + /// # use nalgebra::{Matrix2x3, Vector3}; + /// + /// let m = Matrix2x3::new(1.0, 2.0, 3.0, + /// 4.0, 5.0, 6.0); + /// assert_eq!(m.row_sum_tr(), Vector3::new(5.0, 7.0, 9.0)); + /// ``` #[inline] pub fn row_sum_tr(&self) -> VectorN where DefaultAllocator: Allocator { @@ -80,6 +109,16 @@ impl> Matrix { } /// The sum of all the columns of this matrix. + /// + /// # Example + /// + /// ``` + /// # use nalgebra::{Matrix2x3, Vector2}; + /// + /// let m = Matrix2x3::new(1.0, 2.0, 3.0, + /// 4.0, 5.0, 6.0); + /// assert_eq!(m.column_sum(), Vector2::new(6.0, 15.0)); + /// ``` #[inline] pub fn column_sum(&self) -> VectorN where DefaultAllocator: Allocator { @@ -95,6 +134,16 @@ impl> Matrix { * */ /// The variance of all the elements of this matrix. + /// + /// # Example + /// + /// ``` + /// # use nalgebra::Matrix2x3; + /// + /// let m = Matrix2x3::new(1.0, 2.0, 3.0, + /// 4.0, 5.0, 6.0); + /// assert_eq!(m.variance(), 3.5); + /// ``` #[inline] pub fn variance(&self) -> N { if self.len() == 0 { @@ -107,6 +156,15 @@ impl> Matrix { } /// The variance of all the rows of this matrix. + /// # Example + /// + /// ``` + /// # use nalgebra::{Matrix2x3, RowVector3}; + /// + /// let m = Matrix2x3::new(1.0, 2.0, 3.0, + /// 4.0, 5.0, 6.0); + /// assert_eq!(m.row_variance(), RowVector3::new(4.5, 4.5, 4.5)); + /// ``` #[inline] pub fn row_variance(&self) -> RowVectorN where DefaultAllocator: Allocator { @@ -114,6 +172,16 @@ impl> Matrix { } /// The variance of all the rows of this matrix. The result is transposed and returned as a column vector. + /// + /// # Example + /// + /// ``` + /// # use nalgebra::{Matrix2x3, Vector3}; + /// + /// let m = Matrix2x3::new(1.0, 2.0, 3.0, + /// 4.0, 5.0, 6.0); + /// assert_eq!(m.row_variance_tr(), Vector3::new(4.5, 4.5, 4.5)); + /// ``` #[inline] pub fn row_variance_tr(&self) -> VectorN where DefaultAllocator: Allocator { @@ -121,6 +189,17 @@ impl> Matrix { } /// The variance of all the columns of this matrix. + /// + /// # Example + /// + /// ``` + /// # #[macro_use] extern crate approx; + /// # use nalgebra::{Matrix2x3, Vector2}; + /// + /// let m = Matrix2x3::new(1.0, 2.0, 3.0, + /// 4.0, 5.0, 6.0); + /// assert_relative_eq!(m.column_variance(), Vector2::new(2.0 / 3.0, 2.0 / 3.0), epsilon = 1.0e-8); + /// ``` #[inline] pub fn column_variance(&self) -> VectorN where DefaultAllocator: Allocator { @@ -146,6 +225,16 @@ impl> Matrix { * */ /// The mean of all the elements of this matrix. + /// + /// # Example + /// + /// ``` + /// # use nalgebra::Matrix2x3; + /// + /// let m = Matrix2x3::new(1.0, 2.0, 3.0, + /// 4.0, 5.0, 6.0); + /// assert_eq!(m.mean(), 3.5); + /// ``` #[inline] pub fn mean(&self) -> N { if self.len() == 0 { @@ -156,6 +245,16 @@ impl> Matrix { } /// The mean of all the rows of this matrix. + /// + /// # Example + /// + /// ``` + /// # use nalgebra::{Matrix2x3, RowVector3}; + /// + /// let m = Matrix2x3::new(1.0, 2.0, 3.0, + /// 4.0, 5.0, 6.0); + /// assert_eq!(m.row_mean(), RowVector3::new(2.5, 3.5, 4.5)); + /// ``` #[inline] pub fn row_mean(&self) -> RowVectorN where DefaultAllocator: Allocator { @@ -163,6 +262,16 @@ impl> Matrix { } /// The mean of all the rows of this matrix. The result is transposed and returned as a column vector. + /// + /// # Example + /// + /// ``` + /// # use nalgebra::{Matrix2x3, Vector3}; + /// + /// let m = Matrix2x3::new(1.0, 2.0, 3.0, + /// 4.0, 5.0, 6.0); + /// assert_eq!(m.row_mean_tr(), Vector3::new(2.5, 3.5, 4.5)); + /// ``` #[inline] pub fn row_mean_tr(&self) -> VectorN where DefaultAllocator: Allocator { @@ -170,6 +279,16 @@ impl> Matrix { } /// The mean of all the columns of this matrix. + /// + /// # Example + /// + /// ``` + /// # use nalgebra::{Matrix2x3, Vector2}; + /// + /// let m = Matrix2x3::new(1.0, 2.0, 3.0, + /// 4.0, 5.0, 6.0); + /// assert_eq!(m.column_mean(), Vector2::new(2.0, 5.0)); + /// ``` #[inline] pub fn column_mean(&self) -> VectorN where DefaultAllocator: Allocator { @@ -179,4 +298,4 @@ impl> Matrix { out.axpy(denom, &col, N::one()) }) } -} \ No newline at end of file +} diff --git a/src/geometry/isometry.rs b/src/geometry/isometry.rs index 7ad3d4d9..1814efb5 100644 --- a/src/geometry/isometry.rs +++ b/src/geometry/isometry.rs @@ -113,7 +113,6 @@ where DefaultAllocator: Allocator /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Isometry3, Translation3, UnitQuaternion, Vector3, Point3}; /// let tra = Translation3::new(0.0, 0.0, 3.0); @@ -197,7 +196,6 @@ where DefaultAllocator: Allocator /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Isometry2, Translation2, UnitComplex, Vector2}; /// let mut iso = Isometry2::new(Vector2::new(1.0, 2.0), f32::consts::PI / 6.0); @@ -220,7 +218,6 @@ where DefaultAllocator: Allocator /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Isometry2, Translation2, UnitComplex, Vector2, Point2}; /// let mut iso = Isometry2::new(Vector2::new(1.0, 2.0), f32::consts::FRAC_PI_2); @@ -272,7 +269,6 @@ where DefaultAllocator: Allocator /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Isometry2, Vector2, Matrix3}; /// let iso = Isometry2::new(Vector2::new(10.0, 20.0), f32::consts::FRAC_PI_6); diff --git a/src/geometry/isometry_construction.rs b/src/geometry/isometry_construction.rs index b22ed32a..77a1f7c8 100644 --- a/src/geometry/isometry_construction.rs +++ b/src/geometry/isometry_construction.rs @@ -49,7 +49,6 @@ where DefaultAllocator: Allocator /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Isometry2, Point2, UnitComplex}; /// let rot = UnitComplex::new(f32::consts::PI); @@ -165,7 +164,6 @@ macro_rules! isometry_construction_impl( /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Isometry3, IsometryMatrix3, Point3, Vector3}; /// let axisangle = Vector3::y() * f32::consts::FRAC_PI_2; @@ -206,7 +204,6 @@ macro_rules! isometry_construction_impl( /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Isometry3, IsometryMatrix3, Point3, Vector3}; /// let eye = Point3::new(1.0, 2.0, 3.0); @@ -258,7 +255,6 @@ macro_rules! isometry_construction_impl( /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Isometry3, IsometryMatrix3, Point3, Vector3}; /// let eye = Point3::new(1.0, 2.0, 3.0); @@ -302,7 +298,6 @@ macro_rules! isometry_construction_impl( /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Isometry3, IsometryMatrix3, Point3, Vector3}; /// let eye = Point3::new(1.0, 2.0, 3.0); diff --git a/src/geometry/orthographic.rs b/src/geometry/orthographic.rs index 4a04c8a8..c6c5628b 100644 --- a/src/geometry/orthographic.rs +++ b/src/geometry/orthographic.rs @@ -69,7 +69,6 @@ impl Orthographic3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Orthographic3, Point3}; /// let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// // Check this projection actually transforms the view cuboid into the double-unit cube. @@ -170,7 +169,6 @@ impl Orthographic3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Orthographic3, Point3, Matrix4}; /// let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// let inv = proj.inverse(); @@ -271,7 +269,6 @@ impl Orthographic3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Orthographic3, Point3, Matrix4}; /// let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// let expected = Matrix4::new( @@ -299,7 +296,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// assert_relative_eq!(proj.left(), 1.0, epsilon = 1.0e-6); @@ -316,7 +312,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// assert_relative_eq!(proj.right(), 10.0, epsilon = 1.0e-6); @@ -333,7 +328,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// assert_relative_eq!(proj.bottom(), 2.0, epsilon = 1.0e-6); @@ -350,7 +344,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// assert_relative_eq!(proj.top(), 20.0, epsilon = 1.0e-6); @@ -367,7 +360,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// assert_relative_eq!(proj.znear(), 0.1, epsilon = 1.0e-6); @@ -384,7 +376,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// assert_relative_eq!(proj.zfar(), 1000.0, epsilon = 1.0e-6); @@ -403,7 +394,6 @@ impl Orthographic3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Orthographic3, Point3}; /// let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// @@ -439,7 +429,6 @@ impl Orthographic3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Orthographic3, Point3}; /// let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// @@ -478,7 +467,6 @@ impl Orthographic3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Orthographic3, Vector3}; /// let proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// @@ -504,7 +492,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// proj.set_left(2.0); @@ -524,7 +511,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// proj.set_right(15.0); @@ -544,7 +530,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// proj.set_bottom(8.0); @@ -564,7 +549,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// proj.set_top(15.0); @@ -584,7 +568,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// proj.set_znear(8.0); @@ -604,7 +587,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// proj.set_zfar(15.0); @@ -624,7 +606,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// proj.set_left_and_right(7.0, 70.0); @@ -650,7 +631,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// proj.set_bottom_and_top(7.0, 70.0); @@ -676,7 +656,6 @@ impl Orthographic3 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Orthographic3; /// let mut proj = Orthographic3::new(1.0, 10.0, 2.0, 20.0, 0.1, 1000.0); /// proj.set_znear_and_zfar(50.0, 5000.0); diff --git a/src/geometry/quaternion.rs b/src/geometry/quaternion.rs index 4b0ce6b3..96e4f19a 100644 --- a/src/geometry/quaternion.rs +++ b/src/geometry/quaternion.rs @@ -114,7 +114,6 @@ impl Quaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Quaternion; /// let q = Quaternion::new(1.0, 2.0, 3.0, 4.0); /// let q_normalized = q.normalize(); @@ -150,7 +149,6 @@ impl Quaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Quaternion; /// let q = Quaternion::new(1.0, 2.0, 3.0, 4.0); /// let inv_q = q.try_inverse(); @@ -240,7 +238,6 @@ impl Quaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Quaternion; /// let q = Quaternion::new(1.0, 2.0, 3.0, 4.0); /// assert_relative_eq!(q.norm(), 5.47722557, epsilon = 1.0e-6); @@ -258,7 +255,6 @@ impl Quaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Quaternion; /// let q = Quaternion::new(1.0, 2.0, 3.0, 4.0); /// assert_relative_eq!(q.magnitude(), 5.47722557, epsilon = 1.0e-6); @@ -345,7 +341,6 @@ impl Quaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Quaternion; /// let q = Quaternion::new(2.0, 5.0, 0.0, 0.0); /// assert_relative_eq!(q.ln(), Quaternion::new(1.683647, 1.190289, 0.0, 0.0), epsilon = 1.0e-6) @@ -364,7 +359,6 @@ impl Quaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Quaternion; /// let q = Quaternion::new(1.683647, 1.190289, 0.0, 0.0); /// assert_relative_eq!(q.exp(), Quaternion::new(2.0, 5.0, 0.0, 0.0), epsilon = 1.0e-5) @@ -380,7 +374,6 @@ impl Quaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Quaternion; /// let q = Quaternion::new(1.683647, 1.190289, 0.0, 0.0); /// assert_relative_eq!(q.exp_eps(1.0e-6), Quaternion::new(2.0, 5.0, 0.0, 0.0), epsilon = 1.0e-5); @@ -410,7 +403,6 @@ impl Quaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Quaternion; /// let q = Quaternion::new(1.0, 2.0, 3.0, 4.0); /// assert_relative_eq!(q.powf(1.5), Quaternion::new( -6.2576659, 4.1549037, 6.2323556, 8.3098075), epsilon = 1.0e-6); @@ -476,7 +468,6 @@ impl Quaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Quaternion; /// let mut q = Quaternion::new(1.0, 2.0, 3.0, 4.0); /// @@ -506,7 +497,6 @@ impl Quaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Quaternion; /// let mut q = Quaternion::new(1.0, 2.0, 3.0, 4.0); /// q.normalize_mut(); @@ -672,7 +662,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{UnitQuaternion, Vector3}; /// let rot1 = UnitQuaternion::from_axis_angle(&Vector3::y_axis(), 1.0); /// let rot2 = UnitQuaternion::from_axis_angle(&Vector3::x_axis(), 0.1); @@ -691,7 +680,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{UnitQuaternion, Vector3}; /// let rot1 = UnitQuaternion::from_axis_angle(&Vector3::y_axis(), 1.0); /// let rot2 = UnitQuaternion::from_axis_angle(&Vector3::x_axis(), 0.1); @@ -785,7 +773,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{UnitQuaternion, Vector3, Unit}; /// let axisangle = Vector3::new(0.1, 0.2, 0.3); /// let mut rot = UnitQuaternion::new(axisangle); @@ -828,7 +815,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{UnitQuaternion, Vector3, Unit}; /// let axisangle = Vector3::new(0.1, 0.2, 0.3); /// let rot = UnitQuaternion::new(axisangle); @@ -885,7 +871,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Vector3, UnitQuaternion}; /// let axisangle = Vector3::new(0.1, 0.2, 0.3); /// let q = UnitQuaternion::new(axisangle); @@ -908,7 +893,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{UnitQuaternion, Vector3, Unit}; /// let axis = Unit::new_normalize(Vector3::new(1.0, 2.0, 3.0)); /// let angle = 1.2; @@ -932,7 +916,6 @@ impl UnitQuaternion { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{UnitQuaternion, Vector3, Matrix3}; /// let q = UnitQuaternion::from_axis_angle(&Vector3::z_axis(), f32::consts::FRAC_PI_6); @@ -990,7 +973,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::UnitQuaternion; /// let rot = UnitQuaternion::from_euler_angles(0.1, 0.2, 0.3); /// let euler = rot.euler_angles(); @@ -1009,7 +991,6 @@ impl UnitQuaternion { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{UnitQuaternion, Vector3, Matrix4}; /// let rot = UnitQuaternion::from_axis_angle(&Vector3::z_axis(), f32::consts::FRAC_PI_6); diff --git a/src/geometry/quaternion_construction.rs b/src/geometry/quaternion_construction.rs index 82db8b47..257cb719 100644 --- a/src/geometry/quaternion_construction.rs +++ b/src/geometry/quaternion_construction.rs @@ -166,7 +166,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{UnitQuaternion, Point3, Vector3}; /// let axis = Vector3::y_axis(); @@ -208,7 +207,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::UnitQuaternion; /// let rot = UnitQuaternion::from_euler_angles(0.1, 0.2, 0.3); /// let euler = rot.euler_angles(); @@ -237,7 +235,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Rotation3, UnitQuaternion, Vector3}; /// let axis = Vector3::y_axis(); /// let angle = 0.1; @@ -302,7 +299,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Vector3, UnitQuaternion}; /// let a = Vector3::new(1.0, 2.0, 3.0); /// let b = Vector3::new(3.0, 1.0, 2.0); @@ -325,7 +321,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Vector3, UnitQuaternion}; /// let a = Vector3::new(1.0, 2.0, 3.0); /// let b = Vector3::new(3.0, 1.0, 2.0); @@ -361,7 +356,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Unit, Vector3, UnitQuaternion}; /// let a = Unit::new_normalize(Vector3::new(1.0, 2.0, 3.0)); /// let b = Unit::new_normalize(Vector3::new(3.0, 1.0, 2.0)); @@ -387,7 +381,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Unit, Vector3, UnitQuaternion}; /// let a = Unit::new_normalize(Vector3::new(1.0, 2.0, 3.0)); /// let b = Unit::new_normalize(Vector3::new(3.0, 1.0, 2.0)); @@ -446,7 +439,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{UnitQuaternion, Vector3}; /// let dir = Vector3::new(1.0, 2.0, 3.0); @@ -488,7 +480,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{UnitQuaternion, Vector3}; /// let dir = Vector3::new(1.0, 2.0, 3.0); @@ -520,7 +511,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{UnitQuaternion, Vector3}; /// let dir = Vector3::new(1.0, 2.0, 3.0); @@ -545,7 +535,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{UnitQuaternion, Point3, Vector3}; /// let axisangle = Vector3::y() * f32::consts::FRAC_PI_2; @@ -575,7 +564,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{UnitQuaternion, Point3, Vector3}; /// let axisangle = Vector3::y() * f32::consts::FRAC_PI_2; @@ -606,7 +594,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{UnitQuaternion, Point3, Vector3}; /// let axisangle = Vector3::y() * f32::consts::FRAC_PI_2; @@ -635,7 +622,6 @@ impl UnitQuaternion { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{UnitQuaternion, Point3, Vector3}; /// let axisangle = Vector3::y() * f32::consts::FRAC_PI_2; diff --git a/src/geometry/rotation.rs b/src/geometry/rotation.rs index 299ddb1e..6c50230e 100644 --- a/src/geometry/rotation.rs +++ b/src/geometry/rotation.rs @@ -257,7 +257,6 @@ where DefaultAllocator: Allocator /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Rotation2, Rotation3, Vector3}; /// let rot = Rotation3::new(Vector3::new(1.0, 2.0, 3.0)); /// let tr_rot = rot.transpose(); @@ -281,7 +280,6 @@ where DefaultAllocator: Allocator /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Rotation2, Rotation3, Vector3}; /// let rot = Rotation3::new(Vector3::new(1.0, 2.0, 3.0)); /// let inv = rot.inverse(); @@ -305,7 +303,6 @@ where DefaultAllocator: Allocator /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Rotation2, Rotation3, Vector3}; /// let rot = Rotation3::new(Vector3::new(1.0, 2.0, 3.0)); /// let mut tr_rot = Rotation3::new(Vector3::new(1.0, 2.0, 3.0)); @@ -333,7 +330,6 @@ where DefaultAllocator: Allocator /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Rotation2, Rotation3, Vector3}; /// let rot = Rotation3::new(Vector3::new(1.0, 2.0, 3.0)); /// let mut inv = Rotation3::new(Vector3::new(1.0, 2.0, 3.0)); diff --git a/src/geometry/rotation_specialization.rs b/src/geometry/rotation_specialization.rs index ffb495d1..35ae1ea2 100644 --- a/src/geometry/rotation_specialization.rs +++ b/src/geometry/rotation_specialization.rs @@ -27,7 +27,6 @@ impl Rotation2 { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Rotation2, Point2}; /// let rot = Rotation2::new(f32::consts::FRAC_PI_2); @@ -56,7 +55,6 @@ impl Rotation2 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Vector2, Rotation2}; /// let a = Vector2::new(1.0, 2.0); /// let b = Vector2::new(2.0, 1.0); @@ -79,7 +77,6 @@ impl Rotation2 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Vector2, Rotation2}; /// let a = Vector2::new(1.0, 2.0); /// let b = Vector2::new(2.0, 1.0); @@ -108,7 +105,6 @@ impl Rotation2 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Rotation2; /// let rot = Rotation2::new(1.78); /// assert_relative_eq!(rot.angle(), 1.78); @@ -123,7 +119,6 @@ impl Rotation2 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Rotation2; /// let rot1 = Rotation2::new(0.1); /// let rot2 = Rotation2::new(1.7); @@ -141,7 +136,6 @@ impl Rotation2 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Rotation2; /// let rot1 = Rotation2::new(0.1); /// let rot2 = Rotation2::new(1.7); @@ -161,7 +155,6 @@ impl Rotation2 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Rotation2; /// let rot = Rotation2::new(0.78); /// let pow = rot.powf(2.0); @@ -217,7 +210,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Rotation3, Point3, Vector3}; /// let axisangle = Vector3::y() * f32::consts::FRAC_PI_2; @@ -245,7 +237,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Rotation3, Point3, Vector3}; /// let axisangle = Vector3::y() * f32::consts::FRAC_PI_2; @@ -269,7 +260,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Rotation3, Point3, Vector3}; /// let axis = Vector3::y_axis(); @@ -322,7 +312,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Rotation3; /// let rot = Rotation3::from_euler_angles(0.1, 0.2, 0.3); /// let euler = rot.euler_angles(); @@ -363,7 +352,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::Rotation3; /// let rot = Rotation3::from_euler_angles(0.1, 0.2, 0.3); /// let euler = rot.euler_angles(); @@ -403,7 +391,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Rotation3, Vector3}; /// let dir = Vector3::new(1.0, 2.0, 3.0); @@ -451,7 +438,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Rotation3, Vector3}; /// let dir = Vector3::new(1.0, 2.0, 3.0); @@ -483,7 +469,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Rotation3, Vector3}; /// let dir = Vector3::new(1.0, 2.0, 3.0); @@ -508,7 +493,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Vector3, Rotation3}; /// let a = Vector3::new(1.0, 2.0, 3.0); /// let b = Vector3::new(3.0, 1.0, 2.0); @@ -531,7 +515,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Vector3, Rotation3}; /// let a = Vector3::new(1.0, 2.0, 3.0); /// let b = Vector3::new(3.0, 1.0, 2.0); @@ -576,7 +559,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Unit, Rotation3, Vector3}; /// let axis = Unit::new_normalize(Vector3::new(1.0, 2.0, 3.0)); /// let rot = Rotation3::from_axis_angle(&axis, 1.78); @@ -594,7 +576,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Rotation3, Vector3, Unit}; /// let axis = Unit::new_normalize(Vector3::new(1.0, 2.0, 3.0)); /// let angle = 1.2; @@ -621,7 +602,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Rotation3, Vector3, Unit}; /// let axisangle = Vector3::new(0.1, 0.2, 0.3); /// let rot = Rotation3::new(axisangle); @@ -643,7 +623,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Rotation3, Vector3, Unit}; /// let axis = Unit::new_normalize(Vector3::new(1.0, 2.0, 3.0)); /// let angle = 1.2; @@ -670,7 +649,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Rotation3, Vector3}; /// let rot1 = Rotation3::from_axis_angle(&Vector3::y_axis(), 1.0); /// let rot2 = Rotation3::from_axis_angle(&Vector3::x_axis(), 0.1); @@ -688,7 +666,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Rotation3, Vector3}; /// let rot1 = Rotation3::from_axis_angle(&Vector3::y_axis(), 1.0); /// let rot2 = Rotation3::from_axis_angle(&Vector3::x_axis(), 0.1); @@ -706,7 +683,6 @@ impl Rotation3 { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Rotation3, Vector3, Unit}; /// let axis = Unit::new_normalize(Vector3::new(1.0, 2.0, 3.0)); /// let angle = 1.2; diff --git a/src/geometry/similarity_construction.rs b/src/geometry/similarity_construction.rs index 31a95996..47bb46c7 100644 --- a/src/geometry/similarity_construction.rs +++ b/src/geometry/similarity_construction.rs @@ -86,7 +86,6 @@ where /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Similarity2, Point2, UnitComplex}; /// let rot = UnitComplex::new(f32::consts::FRAC_PI_2); @@ -135,7 +134,6 @@ impl Similarity> { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{SimilarityMatrix2, Vector2, Point2}; /// let sim = SimilarityMatrix2::new(Vector2::new(1.0, 2.0), f32::consts::FRAC_PI_2, 3.0); @@ -159,7 +157,6 @@ impl Similarity> { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Similarity2, Vector2, Point2}; /// let sim = Similarity2::new(Vector2::new(1.0, 2.0), f32::consts::FRAC_PI_2, 3.0); @@ -187,7 +184,6 @@ macro_rules! similarity_construction_impl( /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Similarity3, SimilarityMatrix3, Point3, Vector3}; /// let axisangle = Vector3::y() * f32::consts::FRAC_PI_2; @@ -227,7 +223,6 @@ macro_rules! similarity_construction_impl( /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Similarity3, SimilarityMatrix3, Point3, Vector3}; /// let eye = Point3::new(1.0, 2.0, 3.0); @@ -278,7 +273,6 @@ macro_rules! similarity_construction_impl( /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Similarity3, SimilarityMatrix3, Point3, Vector3}; /// let eye = Point3::new(1.0, 2.0, 3.0); @@ -317,7 +311,6 @@ macro_rules! similarity_construction_impl( /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{Similarity3, SimilarityMatrix3, Point3, Vector3}; /// let eye = Point3::new(1.0, 2.0, 3.0); diff --git a/src/geometry/transform.rs b/src/geometry/transform.rs index 08248a46..0d5d9c4a 100644 --- a/src/geometry/transform.rs +++ b/src/geometry/transform.rs @@ -350,7 +350,6 @@ where DefaultAllocator: Allocator, DimNameSum> /// # Examples /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Matrix3, Transform2}; /// /// let m = Matrix3::new(2.0, 2.0, -0.3, @@ -383,7 +382,6 @@ where DefaultAllocator: Allocator, DimNameSum> /// # Examples /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Matrix3, Projective2}; /// /// let m = Matrix3::new(2.0, 2.0, -0.3, @@ -407,7 +405,6 @@ where DefaultAllocator: Allocator, DimNameSum> /// # Examples /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Matrix3, Transform2}; /// /// let m = Matrix3::new(2.0, 2.0, -0.3, @@ -437,7 +434,6 @@ where DefaultAllocator: Allocator, DimNameSum> /// # Examples /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Matrix3, Projective2}; /// /// let m = Matrix3::new(2.0, 2.0, -0.3, diff --git a/src/geometry/unit_complex.rs b/src/geometry/unit_complex.rs index 62280056..f8d94dc8 100644 --- a/src/geometry/unit_complex.rs +++ b/src/geometry/unit_complex.rs @@ -85,7 +85,6 @@ impl UnitComplex { /// # Example /// ``` /// # extern crate num_complex; - /// # extern crate nalgebra; /// # use num_complex::Complex; /// # use nalgebra::UnitComplex; /// let angle = 1.78f32; @@ -117,7 +116,6 @@ impl UnitComplex { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::UnitComplex; /// let rot = UnitComplex::new(1.2); /// let inv = rot.inverse(); @@ -134,7 +132,6 @@ impl UnitComplex { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::UnitComplex; /// let rot1 = UnitComplex::new(0.1); /// let rot2 = UnitComplex::new(1.7); @@ -153,7 +150,6 @@ impl UnitComplex { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::UnitComplex; /// let rot1 = UnitComplex::new(0.1); /// let rot2 = UnitComplex::new(1.7); @@ -172,7 +168,6 @@ impl UnitComplex { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::UnitComplex; /// let angle = 1.7; /// let rot = UnitComplex::new(angle); @@ -192,7 +187,6 @@ impl UnitComplex { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::UnitComplex; /// let angle = 1.7; /// let mut rot = UnitComplex::new(angle); @@ -213,7 +207,6 @@ impl UnitComplex { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::UnitComplex; /// let rot = UnitComplex::new(0.78); /// let pow = rot.powf(2.0); diff --git a/src/geometry/unit_complex_construction.rs b/src/geometry/unit_complex_construction.rs index fa4a0451..c4c9cc0d 100644 --- a/src/geometry/unit_complex_construction.rs +++ b/src/geometry/unit_complex_construction.rs @@ -35,7 +35,6 @@ impl UnitComplex { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{UnitComplex, Point2}; /// let rot = UnitComplex::new(f32::consts::FRAC_PI_2); @@ -56,7 +55,6 @@ impl UnitComplex { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{UnitComplex, Point2}; /// let rot = UnitComplex::from_angle(f32::consts::FRAC_PI_2); @@ -78,7 +76,6 @@ impl UnitComplex { /// /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use std::f32; /// # use nalgebra::{UnitComplex, Vector2, Point2}; /// let angle = f32::consts::FRAC_PI_2; @@ -138,7 +135,6 @@ impl UnitComplex { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Vector2, UnitComplex}; /// let a = Vector2::new(1.0, 2.0); /// let b = Vector2::new(2.0, 1.0); @@ -161,7 +157,6 @@ impl UnitComplex { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Vector2, UnitComplex}; /// let a = Vector2::new(1.0, 2.0); /// let b = Vector2::new(2.0, 1.0); @@ -197,7 +192,6 @@ impl UnitComplex { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Unit, Vector2, UnitComplex}; /// let a = Unit::new_normalize(Vector2::new(1.0, 2.0)); /// let b = Unit::new_normalize(Vector2::new(2.0, 1.0)); @@ -223,7 +217,6 @@ impl UnitComplex { /// # Example /// ``` /// # #[macro_use] extern crate approx; - /// # extern crate nalgebra; /// # use nalgebra::{Unit, Vector2, UnitComplex}; /// let a = Unit::new_normalize(Vector2::new(1.0, 2.0)); /// let b = Unit::new_normalize(Vector2::new(2.0, 1.0)); diff --git a/tests/core/edition.rs b/tests/core/edition.rs index edaf2f08..37452a2d 100644 --- a/tests/core/edition.rs +++ b/tests/core/edition.rs @@ -565,4 +565,4 @@ fn resize_empty_matrix() { assert_eq!(m1, m5.resize(0, 0, 42)); assert_eq!(m1, m6.resize(0, 0, 42)); assert_eq!(m1, m7.resize(0, 0, 42)); -} \ No newline at end of file +} diff --git a/tests/linalg/full_piv_lu.rs b/tests/linalg/full_piv_lu.rs index 06d87156..5a0ad75b 100644 --- a/tests/linalg/full_piv_lu.rs +++ b/tests/linalg/full_piv_lu.rs @@ -459,4 +459,4 @@ fn resize() { assert_eq!(add_del, m.resize(5, 2, 42)); assert_eq!(del_add, m.resize(1, 8, 42)); } -*/ \ No newline at end of file +*/