forked from M-Labs/nalgebra
Remove useless extern crate in doc-tests.
This commit is contained in:
parent
dcae274d2e
commit
381fdb642c
@ -15,4 +15,4 @@
|
||||
//pub fn uround<N: Scalar, D: Dimension>(x: &TVec<N, D>) -> TVec<u32, D>
|
||||
// where DefaultAllocator: Alloc<N, D> {
|
||||
// unimplemented!()
|
||||
//}
|
||||
//}
|
||||
|
@ -288,4 +288,4 @@ pub fn unpackUnorm4x16(p: u64) -> Vec4 {
|
||||
|
||||
pub fn unpackUnorm4x4(p: u16) -> Vec4 {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
@ -52,4 +52,4 @@ pub fn perspective_glm_nalgebra_project_same()
|
||||
|
||||
assert_eq!(na_mat, gl_mat);
|
||||
assert_eq!(na_pt, gl_pt);
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -711,4 +711,4 @@ impl_index_pairs!{
|
||||
=> DimDiff<C, J>
|
||||
where C: DimSub<J>],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -211,4 +211,4 @@ impl<N: Real, R: Dim, C: Dim, S: StorageMut<N, R, C>> Matrix<N, R, C, S> {
|
||||
Some(n)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,12 +60,31 @@ impl<N: Real, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
|
||||
*
|
||||
*/
|
||||
/// 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<N, C>
|
||||
where DefaultAllocator: Allocator<N, U1, C> {
|
||||
@ -73,6 +92,16 @@ impl<N: Real, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
|
||||
}
|
||||
|
||||
/// 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<N, C>
|
||||
where DefaultAllocator: Allocator<N, C> {
|
||||
@ -80,6 +109,16 @@ impl<N: Real, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
|
||||
}
|
||||
|
||||
/// 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<N, R>
|
||||
where DefaultAllocator: Allocator<N, R> {
|
||||
@ -95,6 +134,16 @@ impl<N: Real, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
|
||||
*
|
||||
*/
|
||||
/// 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<N: Real, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
|
||||
}
|
||||
|
||||
/// 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<N, C>
|
||||
where DefaultAllocator: Allocator<N, U1, C> {
|
||||
@ -114,6 +172,16 @@ impl<N: Real, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
|
||||
}
|
||||
|
||||
/// 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<N, C>
|
||||
where DefaultAllocator: Allocator<N, C> {
|
||||
@ -121,6 +189,17 @@ impl<N: Real, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
|
||||
}
|
||||
|
||||
/// 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<N, R>
|
||||
where DefaultAllocator: Allocator<N, R> {
|
||||
@ -146,6 +225,16 @@ impl<N: Real, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
|
||||
*
|
||||
*/
|
||||
/// 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<N: Real, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
|
||||
}
|
||||
|
||||
/// 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<N, C>
|
||||
where DefaultAllocator: Allocator<N, U1, C> {
|
||||
@ -163,6 +262,16 @@ impl<N: Real, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
|
||||
}
|
||||
|
||||
/// 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<N, C>
|
||||
where DefaultAllocator: Allocator<N, C> {
|
||||
@ -170,6 +279,16 @@ impl<N: Real, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
|
||||
}
|
||||
|
||||
/// 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<N, R>
|
||||
where DefaultAllocator: Allocator<N, R> {
|
||||
@ -179,4 +298,4 @@ impl<N: Real, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
|
||||
out.axpy(denom, &col, N::one())
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,7 +113,6 @@ where DefaultAllocator: Allocator<N, D>
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N, D>
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N, D>
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N, D>
|
||||
///
|
||||
/// ```
|
||||
/// # #[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);
|
||||
|
@ -49,7 +49,6 @@ where DefaultAllocator: Allocator<N, D>
|
||||
///
|
||||
/// ```
|
||||
/// # #[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);
|
||||
|
@ -69,7 +69,6 @@ impl<N: Real> Orthographic3<N> {
|
||||
/// # 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<N: Real> Orthographic3<N> {
|
||||
/// # 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<N: Real> Orthographic3<N> {
|
||||
/// # 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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Orthographic3<N> {
|
||||
/// # 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<N: Real> Orthographic3<N> {
|
||||
/// # 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<N: Real> Orthographic3<N> {
|
||||
/// # 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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Orthographic3<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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);
|
||||
|
@ -114,7 +114,6 @@ impl<N: Real> Quaternion<N> {
|
||||
/// # 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<N: Real> Quaternion<N> {
|
||||
/// # 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<N: Real> Quaternion<N> {
|
||||
/// # 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<N: Real> Quaternion<N> {
|
||||
/// # 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<N: Real> Quaternion<N> {
|
||||
/// # 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<N: Real> Quaternion<N> {
|
||||
/// # 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<N: Real> Quaternion<N> {
|
||||
/// # 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<N: Real> Quaternion<N> {
|
||||
/// # 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<N: Real> Quaternion<N> {
|
||||
/// # 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<N: Real> Quaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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);
|
||||
|
@ -166,7 +166,6 @@ impl<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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<N: Real> UnitQuaternion<N> {
|
||||
/// # 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;
|
||||
|
@ -257,7 +257,6 @@ where DefaultAllocator: Allocator<N, D, D>
|
||||
/// # 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<N, D, D>
|
||||
/// # 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<N, D, D>
|
||||
/// # 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<N, D, D>
|
||||
/// # 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));
|
||||
|
@ -27,7 +27,6 @@ impl<N: Real> Rotation2<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Rotation2<N> {
|
||||
/// # 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<N: Real> Rotation2<N> {
|
||||
/// # 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<N: Real> Rotation2<N> {
|
||||
/// # 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<N: Real> Rotation2<N> {
|
||||
/// # 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<N: Real> Rotation2<N> {
|
||||
/// # 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<N: Real> Rotation2<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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<N: Real> Rotation3<N> {
|
||||
/// # 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;
|
||||
|
@ -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<N: Real> Similarity<N, U2, Rotation2<N>> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> Similarity<N, U2, UnitComplex<N>> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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);
|
||||
|
@ -350,7 +350,6 @@ where DefaultAllocator: Allocator<N, DimNameSum<D, U1>, DimNameSum<D, U1>>
|
||||
/// # 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<N, DimNameSum<D, U1>, DimNameSum<D, U1>>
|
||||
/// # 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<N, DimNameSum<D, U1>, DimNameSum<D, U1>>
|
||||
/// # 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<N, DimNameSum<D, U1>, DimNameSum<D, U1>>
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// # #[macro_use] extern crate approx;
|
||||
/// # extern crate nalgebra;
|
||||
/// # use nalgebra::{Matrix3, Projective2};
|
||||
///
|
||||
/// let m = Matrix3::new(2.0, 2.0, -0.3,
|
||||
|
@ -85,7 +85,6 @@ impl<N: Real> UnitComplex<N> {
|
||||
/// # Example
|
||||
/// ```
|
||||
/// # extern crate num_complex;
|
||||
/// # extern crate nalgebra;
|
||||
/// # use num_complex::Complex;
|
||||
/// # use nalgebra::UnitComplex;
|
||||
/// let angle = 1.78f32;
|
||||
@ -117,7 +116,6 @@ impl<N: Real> UnitComplex<N> {
|
||||
/// # 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<N: Real> UnitComplex<N> {
|
||||
/// # 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<N: Real> UnitComplex<N> {
|
||||
/// # 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<N: Real> UnitComplex<N> {
|
||||
/// # 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<N: Real> UnitComplex<N> {
|
||||
/// # 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<N: Real> UnitComplex<N> {
|
||||
/// # Example
|
||||
/// ```
|
||||
/// # #[macro_use] extern crate approx;
|
||||
/// # extern crate nalgebra;
|
||||
/// # use nalgebra::UnitComplex;
|
||||
/// let rot = UnitComplex::new(0.78);
|
||||
/// let pow = rot.powf(2.0);
|
||||
|
@ -35,7 +35,6 @@ impl<N: Real> UnitComplex<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> UnitComplex<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> UnitComplex<N> {
|
||||
///
|
||||
/// ```
|
||||
/// # #[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<N: Real> UnitComplex<N> {
|
||||
/// # 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<N: Real> UnitComplex<N> {
|
||||
/// # 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<N: Real> UnitComplex<N> {
|
||||
/// # 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<N: Real> UnitComplex<N> {
|
||||
/// # 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));
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -459,4 +459,4 @@ fn resize() {
|
||||
assert_eq!(add_del, m.resize(5, 2, 42));
|
||||
assert_eq!(del_add, m.resize(1, 8, 42));
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user