[−][src]Type Definition nalgebra::geometry::UnitComplex
type UnitComplex<N> = Unit<Complex<N>>;
A complex number with a norm equal to 1.
Methods
impl<N: RealField> UnitComplex<N>
[src]
pub fn angle(&self) -> N
[src]
The rotation angle in ]-pi; pi]
of this unit complex number.
Example
let rot = UnitComplex::new(1.78); assert_eq!(rot.angle(), 1.78);
pub fn sin_angle(&self) -> N
[src]
The sine of the rotation angle.
Example
let angle = 1.78f32; let rot = UnitComplex::new(angle); assert_eq!(rot.sin_angle(), angle.sin());
pub fn cos_angle(&self) -> N
[src]
The cosine of the rotation angle.
Example
let angle = 1.78f32; let rot = UnitComplex::new(angle); assert_eq!(rot.cos_angle(),angle.cos());
pub fn scaled_axis(&self) -> Vector1<N>
[src]
The rotation angle returned as a 1-dimensional vector.
This is generally used in the context of generic programming. Using
the .angle()
method instead is more common.
pub fn axis_angle(&self) -> Option<(Unit<Vector1<N>>, N)>
[src]
The rotation axis and angle in ]0, pi] of this complex number.
This is generally used in the context of generic programming. Using
the .angle()
method instead is more common.
Returns None
if the angle is zero.
pub fn complex(&self) -> &Complex<N>
[src]
The underlying complex number.
Same as self.as_ref()
.
Example
let angle = 1.78f32; let rot = UnitComplex::new(angle); assert_eq!(*rot.complex(), Complex::new(angle.cos(), angle.sin()));
pub fn conjugate(&self) -> Self
[src]
Compute the conjugate of this unit complex number.
Example
let rot = UnitComplex::new(1.78); let conj = rot.conjugate(); assert_eq!(rot.complex().im, -conj.complex().im); assert_eq!(rot.complex().re, conj.complex().re);
pub fn inverse(&self) -> Self
[src]
Inverts this complex number if it is not zero.
Example
let rot = UnitComplex::new(1.2); let inv = rot.inverse(); assert_relative_eq!(rot * inv, UnitComplex::identity(), epsilon = 1.0e-6); assert_relative_eq!(inv * rot, UnitComplex::identity(), epsilon = 1.0e-6);
pub fn angle_to(&self, other: &Self) -> N
[src]
The rotation angle needed to make self
and other
coincide.
Example
let rot1 = UnitComplex::new(0.1); let rot2 = UnitComplex::new(1.7); assert_relative_eq!(rot1.angle_to(&rot2), 1.6);
pub fn rotation_to(&self, other: &Self) -> Self
[src]
The unit complex number needed to make self
and other
coincide.
The result is such that: self.rotation_to(other) * self == other
.
Example
let rot1 = UnitComplex::new(0.1); let rot2 = UnitComplex::new(1.7); let rot_to = rot1.rotation_to(&rot2); assert_relative_eq!(rot_to * rot1, rot2); assert_relative_eq!(rot_to.inverse() * rot2, rot1);
pub fn conjugate_mut(&mut self)
[src]
Compute in-place the conjugate of this unit complex number.
Example
let angle = 1.7; let rot = UnitComplex::new(angle); let mut conj = UnitComplex::new(angle); conj.conjugate_mut(); assert_eq!(rot.complex().im, -conj.complex().im); assert_eq!(rot.complex().re, conj.complex().re);
pub fn inverse_mut(&mut self)
[src]
Inverts in-place this unit complex number.
Example
let angle = 1.7; let mut rot = UnitComplex::new(angle); rot.inverse_mut(); assert_relative_eq!(rot * UnitComplex::new(angle), UnitComplex::identity()); assert_relative_eq!(UnitComplex::new(angle) * rot, UnitComplex::identity());
pub fn powf(&self, n: N) -> Self
[src]
Raise this unit complex number to a given floating power.
This returns the unit complex number that identifies a rotation angle equal to
self.angle() × n
.
Example
let rot = UnitComplex::new(0.78); let pow = rot.powf(2.0); assert_relative_eq!(pow.angle(), 2.0 * 0.78);
pub fn to_rotation_matrix(&self) -> Rotation2<N>
[src]
Builds the rotation matrix corresponding to this unit complex number.
Example
let rot = UnitComplex::new(f32::consts::FRAC_PI_6); let expected = Rotation2::new(f32::consts::FRAC_PI_6); assert_eq!(rot.to_rotation_matrix(), expected);
pub fn to_homogeneous(&self) -> Matrix3<N>
[src]
Converts this unit complex number into its equivalent homogeneous transformation matrix.
Example
let rot = UnitComplex::new(f32::consts::FRAC_PI_6); let expected = Matrix3::new(0.8660254, -0.5, 0.0, 0.5, 0.8660254, 0.0, 0.0, 0.0, 1.0); assert_eq!(rot.to_homogeneous(), expected);
pub fn transform_point(&self, pt: &Point2<N>) -> Point2<N>
[src]
Rotate the given point by this unit complex number.
This is the same as the multiplication self * pt
.
Example
let rot = UnitComplex::new(f32::consts::FRAC_PI_2); let transformed_point = rot.transform_point(&Point2::new(1.0, 2.0)); assert_relative_eq!(transformed_point, Point2::new(-2.0, 1.0), epsilon = 1.0e-6);
pub fn transform_vector(&self, v: &Vector2<N>) -> Vector2<N>
[src]
Rotate the given vector by this unit complex number.
This is the same as the multiplication self * v
.
Example
let rot = UnitComplex::new(f32::consts::FRAC_PI_2); let transformed_vector = rot.transform_vector(&Vector2::new(1.0, 2.0)); assert_relative_eq!(transformed_vector, Vector2::new(-2.0, 1.0), epsilon = 1.0e-6);
pub fn inverse_transform_point(&self, pt: &Point2<N>) -> Point2<N>
[src]
Rotate the given point by the inverse of this unit complex number.
Example
let rot = UnitComplex::new(f32::consts::FRAC_PI_2); let transformed_point = rot.inverse_transform_point(&Point2::new(1.0, 2.0)); assert_relative_eq!(transformed_point, Point2::new(2.0, -1.0), epsilon = 1.0e-6);
pub fn inverse_transform_vector(&self, v: &Vector2<N>) -> Vector2<N>
[src]
Rotate the given vector by the inverse of this unit complex number.
Example
let rot = UnitComplex::new(f32::consts::FRAC_PI_2); let transformed_vector = rot.inverse_transform_vector(&Vector2::new(1.0, 2.0)); assert_relative_eq!(transformed_vector, Vector2::new(2.0, -1.0), epsilon = 1.0e-6);
impl<N: RealField> UnitComplex<N>
[src]
pub fn identity() -> Self
[src]
The unit complex number multiplicative identity.
Example
let rot1 = UnitComplex::identity(); let rot2 = UnitComplex::new(1.7); assert_eq!(rot1 * rot2, rot2); assert_eq!(rot2 * rot1, rot2);
pub fn new(angle: N) -> Self
[src]
Builds the unit complex number corresponding to the rotation with the given angle.
Example
let rot = UnitComplex::new(f32::consts::FRAC_PI_2); assert_relative_eq!(rot * Point2::new(3.0, 4.0), Point2::new(-4.0, 3.0));
pub fn from_angle(angle: N) -> Self
[src]
Builds the unit complex number corresponding to the rotation with the angle.
Same as Self::new(angle)
.
Example
let rot = UnitComplex::from_angle(f32::consts::FRAC_PI_2); assert_relative_eq!(rot * Point2::new(3.0, 4.0), Point2::new(-4.0, 3.0));
pub fn from_cos_sin_unchecked(cos: N, sin: N) -> Self
[src]
Builds the unit complex number from the sinus and cosinus of the rotation angle.
The input values are not checked to actually be cosines and sine of the same value.
Is is generally preferable to use the ::new(angle)
constructor instead.
Example
let angle = f32::consts::FRAC_PI_2; let rot = UnitComplex::from_cos_sin_unchecked(angle.cos(), angle.sin()); assert_relative_eq!(rot * Point2::new(3.0, 4.0), Point2::new(-4.0, 3.0));
pub fn from_scaled_axis<SB: Storage<N, U1>>(
axisangle: Vector<N, U1, SB>
) -> Self
[src]
axisangle: Vector<N, U1, SB>
) -> Self
Builds a unit complex rotation from an angle in radian wrapped in a 1-dimensional vector.
This is generally used in the context of generic programming. Using
the ::new(angle)
method instead is more common.
pub fn from_complex(q: Complex<N>) -> Self
[src]
Creates a new unit complex number from a complex number.
The input complex number will be normalized.
pub fn from_complex_and_get(q: Complex<N>) -> (Self, N)
[src]
Creates a new unit complex number from a complex number.
The input complex number will be normalized. Returns the norm of the complex number as well.
pub fn from_rotation_matrix(rotmat: &Rotation2<N>) -> Self
[src]
Builds the unit complex number from the corresponding 2D rotation matrix.
Example
let rot = Rotation2::new(1.7); let complex = UnitComplex::from_rotation_matrix(&rot); assert_eq!(complex, UnitComplex::new(1.7));
pub fn from_matrix(m: &Matrix2<N>) -> Self
[src]
Builds an unit complex by extracting the rotation part of the given transformation m
.
This is an iterative method. See .from_matrix_eps
to provide mover
convergence parameters and starting solution.
This implements "A Robust Method to Extract the Rotational Part of Deformations" by Müller et al.
pub fn from_matrix_eps(
m: &Matrix2<N>,
eps: N,
max_iter: usize,
guess: Self
) -> Self
[src]
m: &Matrix2<N>,
eps: N,
max_iter: usize,
guess: Self
) -> Self
Builds an unit complex by extracting the rotation part of the given transformation m
.
This implements "A Robust Method to Extract the Rotational Part of Deformations" by Müller et al.
Parameters
m
: the matrix from which the rotational part is to be extracted.eps
: the angular errors tolerated between the current rotation and the optimal one.max_iter
: the maximum number of iterations. Loops indefinitely until convergence if set to0
.guess
: an estimate of the solution. Convergence will be significantly faster if an initial solution close to the actual solution is provided. Can be set toUnitQuaternion::identity()
if no other guesses come to mind.
pub fn rotation_between<SB, SC>(
a: &Vector<N, U2, SB>,
b: &Vector<N, U2, SC>
) -> Self where
SB: Storage<N, U2>,
SC: Storage<N, U2>,
[src]
a: &Vector<N, U2, SB>,
b: &Vector<N, U2, SC>
) -> Self where
SB: Storage<N, U2>,
SC: Storage<N, U2>,
The unit complex needed to make a
and b
be collinear and point toward the same
direction.
Example
let a = Vector2::new(1.0, 2.0); let b = Vector2::new(2.0, 1.0); let rot = UnitComplex::rotation_between(&a, &b); assert_relative_eq!(rot * a, b); assert_relative_eq!(rot.inverse() * b, a);
pub fn scaled_rotation_between<SB, SC>(
a: &Vector<N, U2, SB>,
b: &Vector<N, U2, SC>,
s: N
) -> Self where
SB: Storage<N, U2>,
SC: Storage<N, U2>,
[src]
a: &Vector<N, U2, SB>,
b: &Vector<N, U2, SC>,
s: N
) -> Self where
SB: Storage<N, U2>,
SC: Storage<N, U2>,
The smallest rotation needed to make a
and b
collinear and point toward the same
direction, raised to the power s
.
Example
let a = Vector2::new(1.0, 2.0); let b = Vector2::new(2.0, 1.0); let rot2 = UnitComplex::scaled_rotation_between(&a, &b, 0.2); let rot5 = UnitComplex::scaled_rotation_between(&a, &b, 0.5); assert_relative_eq!(rot2 * rot2 * rot2 * rot2 * rot2 * a, b, epsilon = 1.0e-6); assert_relative_eq!(rot5 * rot5 * a, b, epsilon = 1.0e-6);
pub fn rotation_between_axis<SB, SC>(
a: &Unit<Vector<N, U2, SB>>,
b: &Unit<Vector<N, U2, SC>>
) -> Self where
SB: Storage<N, U2>,
SC: Storage<N, U2>,
[src]
a: &Unit<Vector<N, U2, SB>>,
b: &Unit<Vector<N, U2, SC>>
) -> Self where
SB: Storage<N, U2>,
SC: Storage<N, U2>,
The unit complex needed to make a
and b
be collinear and point toward the same
direction.
Example
let a = Unit::new_normalize(Vector2::new(1.0, 2.0)); let b = Unit::new_normalize(Vector2::new(2.0, 1.0)); let rot = UnitComplex::rotation_between_axis(&a, &b); assert_relative_eq!(rot * a, b); assert_relative_eq!(rot.inverse() * b, a);
pub fn scaled_rotation_between_axis<SB, SC>(
na: &Unit<Vector<N, U2, SB>>,
nb: &Unit<Vector<N, U2, SC>>,
s: N
) -> Self where
SB: Storage<N, U2>,
SC: Storage<N, U2>,
[src]
na: &Unit<Vector<N, U2, SB>>,
nb: &Unit<Vector<N, U2, SC>>,
s: N
) -> Self where
SB: Storage<N, U2>,
SC: Storage<N, U2>,
The smallest rotation needed to make a
and b
collinear and point toward the same
direction, raised to the power s
.
Example
let a = Unit::new_normalize(Vector2::new(1.0, 2.0)); let b = Unit::new_normalize(Vector2::new(2.0, 1.0)); let rot2 = UnitComplex::scaled_rotation_between_axis(&a, &b, 0.2); let rot5 = UnitComplex::scaled_rotation_between_axis(&a, &b, 0.5); assert_relative_eq!(rot2 * rot2 * rot2 * rot2 * rot2 * a, b, epsilon = 1.0e-6); assert_relative_eq!(rot5 * rot5 * a, b, epsilon = 1.0e-6);
Trait Implementations
impl<N: RealField> From<Rotation<N, U2>> for UnitComplex<N>
[src]
impl<N: RealField + Display> Display for UnitComplex<N>
[src]
impl<N: RealField> Mul<Unit<Complex<N>>> for UnitComplex<N>
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Self
[src]
impl<'a, N: RealField> Mul<Unit<Complex<N>>> for &'a UnitComplex<N>
[src]
type Output = UnitComplex<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: UnitComplex<N>) -> Self::Output
[src]
impl<'b, N: RealField> Mul<&'b Unit<Complex<N>>> for UnitComplex<N>
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b UnitComplex<N>) -> Self::Output
[src]
impl<'a, 'b, N: RealField> Mul<&'b Unit<Complex<N>>> for &'a UnitComplex<N>
[src]
type Output = UnitComplex<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b UnitComplex<N>) -> Self::Output
[src]
impl<N: RealField> Mul<Rotation<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U2>,
[src]
DefaultAllocator: Allocator<N, U2, U2>,
type Output = UnitComplex<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: Rotation<N, U2>) -> Self::Output
[src]
impl<'a, N: RealField> Mul<Rotation<N, U2>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U2>,
[src]
DefaultAllocator: Allocator<N, U2, U2>,
type Output = UnitComplex<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: Rotation<N, U2>) -> Self::Output
[src]
impl<'b, N: RealField> Mul<&'b Rotation<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U2>,
[src]
DefaultAllocator: Allocator<N, U2, U2>,
type Output = UnitComplex<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Rotation<N, U2>) -> Self::Output
[src]
impl<'a, 'b, N: RealField> Mul<&'b Rotation<N, U2>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U2>,
[src]
DefaultAllocator: Allocator<N, U2, U2>,
type Output = UnitComplex<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Rotation<N, U2>) -> Self::Output
[src]
impl<N: RealField> Mul<Point<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Point2<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: Point2<N>) -> Self::Output
[src]
impl<'a, N: RealField> Mul<Point<N, U2>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Point2<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: Point2<N>) -> Self::Output
[src]
impl<'b, N: RealField> Mul<&'b Point<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Point2<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Point2<N>) -> Self::Output
[src]
impl<'a, 'b, N: RealField> Mul<&'b Point<N, U2>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Point2<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Point2<N>) -> Self::Output
[src]
impl<N: RealField, S: Storage<N, U2>> Mul<Matrix<N, U2, U1, S>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Vector2<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: Vector<N, U2, S>) -> Self::Output
[src]
impl<'a, N: RealField, S: Storage<N, U2>> Mul<Matrix<N, U2, U1, S>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Vector2<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: Vector<N, U2, S>) -> Self::Output
[src]
impl<'b, N: RealField, S: Storage<N, U2>> Mul<&'b Matrix<N, U2, U1, S>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Vector2<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Vector<N, U2, S>) -> Self::Output
[src]
impl<'a, 'b, N: RealField, S: Storage<N, U2>> Mul<&'b Matrix<N, U2, U1, S>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Vector2<N>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Vector<N, U2, S>) -> Self::Output
[src]
impl<N: RealField, S: Storage<N, U2>> Mul<Unit<Matrix<N, U2, U1, S>>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Unit<Vector2<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: Unit<Vector<N, U2, S>>) -> Self::Output
[src]
impl<'a, N: RealField, S: Storage<N, U2>> Mul<Unit<Matrix<N, U2, U1, S>>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Unit<Vector2<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: Unit<Vector<N, U2, S>>) -> Self::Output
[src]
impl<'b, N: RealField, S: Storage<N, U2>> Mul<&'b Unit<Matrix<N, U2, U1, S>>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Unit<Vector2<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Unit<Vector<N, U2, S>>) -> Self::Output
[src]
impl<'a, 'b, N: RealField, S: Storage<N, U2>> Mul<&'b Unit<Matrix<N, U2, U1, S>>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Unit<Vector2<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Unit<Vector<N, U2, S>>) -> Self::Output
[src]
impl<N: RealField> Mul<Isometry<N, U2, Unit<Complex<N>>>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Isometry<N, U2, UnitComplex<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: Isometry<N, U2, UnitComplex<N>>) -> Self::Output
[src]
impl<'a, N: RealField> Mul<Isometry<N, U2, Unit<Complex<N>>>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Isometry<N, U2, UnitComplex<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: Isometry<N, U2, UnitComplex<N>>) -> Self::Output
[src]
impl<'b, N: RealField> Mul<&'b Isometry<N, U2, Unit<Complex<N>>>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Isometry<N, U2, UnitComplex<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Isometry<N, U2, UnitComplex<N>>) -> Self::Output
[src]
impl<'a, 'b, N: RealField> Mul<&'b Isometry<N, U2, Unit<Complex<N>>>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Isometry<N, U2, UnitComplex<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Isometry<N, U2, UnitComplex<N>>) -> Self::Output
[src]
impl<N: RealField> Mul<Similarity<N, U2, Unit<Complex<N>>>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Similarity<N, U2, UnitComplex<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: Similarity<N, U2, UnitComplex<N>>) -> Self::Output
[src]
impl<'a, N: RealField> Mul<Similarity<N, U2, Unit<Complex<N>>>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Similarity<N, U2, UnitComplex<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: Similarity<N, U2, UnitComplex<N>>) -> Self::Output
[src]
impl<'b, N: RealField> Mul<&'b Similarity<N, U2, Unit<Complex<N>>>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Similarity<N, U2, UnitComplex<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Similarity<N, U2, UnitComplex<N>>) -> Self::Output
[src]
impl<'a, 'b, N: RealField> Mul<&'b Similarity<N, U2, Unit<Complex<N>>>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Similarity<N, U2, UnitComplex<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Similarity<N, U2, UnitComplex<N>>) -> Self::Output
[src]
impl<N: RealField> Mul<Translation<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Isometry<N, U2, UnitComplex<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: Translation<N, U2>) -> Self::Output
[src]
impl<'a, N: RealField> Mul<Translation<N, U2>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Isometry<N, U2, UnitComplex<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: Translation<N, U2>) -> Self::Output
[src]
impl<'b, N: RealField> Mul<&'b Translation<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Isometry<N, U2, UnitComplex<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Translation<N, U2>) -> Self::Output
[src]
impl<'a, 'b, N: RealField> Mul<&'b Translation<N, U2>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U1>,
[src]
DefaultAllocator: Allocator<N, U2, U1>,
type Output = Isometry<N, U2, UnitComplex<N>>
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Translation<N, U2>) -> Self::Output
[src]
impl<N: RealField> Div<Unit<Complex<N>>> for UnitComplex<N>
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: Self) -> Self::Output
[src]
impl<'a, N: RealField> Div<Unit<Complex<N>>> for &'a UnitComplex<N>
[src]
type Output = UnitComplex<N>
The resulting type after applying the /
operator.
fn div(self, rhs: UnitComplex<N>) -> Self::Output
[src]
impl<'b, N: RealField> Div<&'b Unit<Complex<N>>> for UnitComplex<N>
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: &'b UnitComplex<N>) -> Self::Output
[src]
impl<'a, 'b, N: RealField> Div<&'b Unit<Complex<N>>> for &'a UnitComplex<N>
[src]
type Output = UnitComplex<N>
The resulting type after applying the /
operator.
fn div(self, rhs: &'b UnitComplex<N>) -> Self::Output
[src]
impl<N: RealField> Div<Rotation<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U2>,
[src]
DefaultAllocator: Allocator<N, U2, U2>,
type Output = UnitComplex<N>
The resulting type after applying the /
operator.
fn div(self, rhs: Rotation<N, U2>) -> Self::Output
[src]
impl<'a, N: RealField> Div<Rotation<N, U2>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U2>,
[src]
DefaultAllocator: Allocator<N, U2, U2>,
type Output = UnitComplex<N>
The resulting type after applying the /
operator.
fn div(self, rhs: Rotation<N, U2>) -> Self::Output
[src]
impl<'b, N: RealField> Div<&'b Rotation<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U2>,
[src]
DefaultAllocator: Allocator<N, U2, U2>,
type Output = UnitComplex<N>
The resulting type after applying the /
operator.
fn div(self, rhs: &'b Rotation<N, U2>) -> Self::Output
[src]
impl<'a, 'b, N: RealField> Div<&'b Rotation<N, U2>> for &'a UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U2>,
[src]
DefaultAllocator: Allocator<N, U2, U2>,
type Output = UnitComplex<N>
The resulting type after applying the /
operator.
fn div(self, rhs: &'b Rotation<N, U2>) -> Self::Output
[src]
impl<N: RealField> MulAssign<Unit<Complex<N>>> for UnitComplex<N>
[src]
fn mul_assign(&mut self, rhs: UnitComplex<N>)
[src]
impl<'b, N: RealField> MulAssign<&'b Unit<Complex<N>>> for UnitComplex<N>
[src]
fn mul_assign(&mut self, rhs: &'b UnitComplex<N>)
[src]
impl<N: RealField> MulAssign<Rotation<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U2>,
[src]
DefaultAllocator: Allocator<N, U2, U2>,
fn mul_assign(&mut self, rhs: Rotation<N, U2>)
[src]
impl<'b, N: RealField> MulAssign<&'b Rotation<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U2>,
[src]
DefaultAllocator: Allocator<N, U2, U2>,
fn mul_assign(&mut self, rhs: &'b Rotation<N, U2>)
[src]
impl<N: RealField> DivAssign<Unit<Complex<N>>> for UnitComplex<N>
[src]
fn div_assign(&mut self, rhs: UnitComplex<N>)
[src]
impl<'b, N: RealField> DivAssign<&'b Unit<Complex<N>>> for UnitComplex<N>
[src]
fn div_assign(&mut self, rhs: &'b UnitComplex<N>)
[src]
impl<N: RealField> DivAssign<Rotation<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U2>,
[src]
DefaultAllocator: Allocator<N, U2, U2>,
fn div_assign(&mut self, rhs: Rotation<N, U2>)
[src]
impl<'b, N: RealField> DivAssign<&'b Rotation<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2, U2>,
[src]
DefaultAllocator: Allocator<N, U2, U2>,
fn div_assign(&mut self, rhs: &'b Rotation<N, U2>)
[src]
impl<N: RealField> AbsDiffEq<Unit<Complex<N>>> for UnitComplex<N>
[src]
type Epsilon = N
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
[src]
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
[src]
The inverse of ApproxEq::abs_diff_eq
.
impl<N: RealField> RelativeEq<Unit<Complex<N>>> for UnitComplex<N>
[src]
fn default_max_relative() -> Self::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of ApproxEq::relative_eq
.
impl<N: RealField> UlpsEq<Unit<Complex<N>>> for UnitComplex<N>
[src]
fn default_max_ulps() -> u32
[src]
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
The inverse of ApproxEq::ulps_eq
.
impl<N: RealField> One for UnitComplex<N>
[src]
fn one() -> Self
[src]
fn set_one(&mut self)
[src]
Sets self
to the multiplicative identity element of Self
, 1
.
fn is_one(&self) -> bool where
Self: PartialEq<Self>,
[src]
Self: PartialEq<Self>,
Returns true
if self
is equal to the multiplicative identity. Read more
impl<N: RealField> AbstractMagma<Multiplicative> for UnitComplex<N>
[src]
fn operate(&self, rhs: &Self) -> Self
[src]
fn op(&self, O, lhs: &Self) -> Self
[src]
Performs specific operation.
impl<N: RealField> AbstractQuasigroup<Multiplicative> for UnitComplex<N>
[src]
fn prop_inv_is_latin_square_approx(args: (Self, Self)) -> bool where
Self: RelativeEq<Self>,
[src]
Self: RelativeEq<Self>,
Returns true
if latin squareness holds for the given arguments. Approximate equality is used for verifications. Read more
fn prop_inv_is_latin_square(args: (Self, Self)) -> bool where
Self: Eq,
[src]
Self: Eq,
Returns true
if latin squareness holds for the given arguments. Read more
impl<N: RealField> AbstractSemigroup<Multiplicative> for UnitComplex<N>
[src]
fn prop_is_associative_approx(args: (Self, Self, Self)) -> bool where
Self: RelativeEq<Self>,
[src]
Self: RelativeEq<Self>,
Returns true
if associativity holds for the given arguments. Approximate equality is used for verifications. Read more
fn prop_is_associative(args: (Self, Self, Self)) -> bool where
Self: Eq,
[src]
Self: Eq,
Returns true
if associativity holds for the given arguments.
impl<N: RealField> AbstractLoop<Multiplicative> for UnitComplex<N>
[src]
impl<N: RealField> AbstractMonoid<Multiplicative> for UnitComplex<N>
[src]
fn prop_operating_identity_element_is_noop_approx(args: (Self,)) -> bool where
Self: RelativeEq<Self>,
[src]
Self: RelativeEq<Self>,
Checks whether operating with the identity element is a no-op for the given argument. Approximate equality is used for verifications. Read more
fn prop_operating_identity_element_is_noop(args: (Self,)) -> bool where
Self: Eq,
[src]
Self: Eq,
Checks whether operating with the identity element is a no-op for the given argument. Read more
impl<N: RealField> AbstractGroup<Multiplicative> for UnitComplex<N>
[src]
impl<N: RealField> TwoSidedInverse<Multiplicative> for UnitComplex<N>
[src]
fn two_sided_inverse(&self) -> Self
[src]
fn two_sided_inverse_mut(&mut self)
[src]
impl<N: RealField> Identity<Multiplicative> for UnitComplex<N>
[src]
impl<N1, N2> SubsetOf<Unit<Complex<N2>>> for UnitComplex<N1> where
N1: RealField,
N2: RealField + SupersetOf<N1>,
[src]
N1: RealField,
N2: RealField + SupersetOf<N1>,
fn to_superset(&self) -> UnitComplex<N2>
[src]
fn is_in_subset(uq: &UnitComplex<N2>) -> bool
[src]
unsafe fn from_superset_unchecked(uq: &UnitComplex<N2>) -> Self
[src]
fn from_superset(element: &T) -> Option<Self>
[src]
The inverse inclusion map: attempts to construct self
from the equivalent element of its superset. Read more
impl<N1, N2> SubsetOf<Rotation<N2, U2>> for UnitComplex<N1> where
N1: RealField,
N2: RealField + SupersetOf<N1>,
[src]
N1: RealField,
N2: RealField + SupersetOf<N1>,
fn to_superset(&self) -> Rotation2<N2>
[src]
fn is_in_subset(rot: &Rotation2<N2>) -> bool
[src]
unsafe fn from_superset_unchecked(rot: &Rotation2<N2>) -> Self
[src]
fn from_superset(element: &T) -> Option<Self>
[src]
The inverse inclusion map: attempts to construct self
from the equivalent element of its superset. Read more
impl<N1, N2, R> SubsetOf<Isometry<N2, U2, R>> for UnitComplex<N1> where
N1: RealField,
N2: RealField + SupersetOf<N1>,
R: AlgaRotation<Point2<N2>> + SupersetOf<Self>,
[src]
N1: RealField,
N2: RealField + SupersetOf<N1>,
R: AlgaRotation<Point2<N2>> + SupersetOf<Self>,
fn to_superset(&self) -> Isometry<N2, U2, R>
[src]
fn is_in_subset(iso: &Isometry<N2, U2, R>) -> bool
[src]
unsafe fn from_superset_unchecked(iso: &Isometry<N2, U2, R>) -> Self
[src]
fn from_superset(element: &T) -> Option<Self>
[src]
The inverse inclusion map: attempts to construct self
from the equivalent element of its superset. Read more
impl<N1, N2, R> SubsetOf<Similarity<N2, U2, R>> for UnitComplex<N1> where
N1: RealField,
N2: RealField + SupersetOf<N1>,
R: AlgaRotation<Point2<N2>> + SupersetOf<Self>,
[src]
N1: RealField,
N2: RealField + SupersetOf<N1>,
R: AlgaRotation<Point2<N2>> + SupersetOf<Self>,
fn to_superset(&self) -> Similarity<N2, U2, R>
[src]
fn is_in_subset(sim: &Similarity<N2, U2, R>) -> bool
[src]
unsafe fn from_superset_unchecked(sim: &Similarity<N2, U2, R>) -> Self
[src]
fn from_superset(element: &T) -> Option<Self>
[src]
The inverse inclusion map: attempts to construct self
from the equivalent element of its superset. Read more
impl<N1, N2, C> SubsetOf<Transform<N2, U2, C>> for UnitComplex<N1> where
N1: RealField,
N2: RealField + SupersetOf<N1>,
C: SuperTCategoryOf<TAffine>,
[src]
N1: RealField,
N2: RealField + SupersetOf<N1>,
C: SuperTCategoryOf<TAffine>,
fn to_superset(&self) -> Transform<N2, U2, C>
[src]
fn is_in_subset(t: &Transform<N2, U2, C>) -> bool
[src]
unsafe fn from_superset_unchecked(t: &Transform<N2, U2, C>) -> Self
[src]
fn from_superset(element: &T) -> Option<Self>
[src]
The inverse inclusion map: attempts to construct self
from the equivalent element of its superset. Read more
impl<N1: RealField, N2: RealField + SupersetOf<N1>> SubsetOf<Matrix<N2, U3, U3, <DefaultAllocator as Allocator<N2, U3, U3>>::Buffer>> for UnitComplex<N1>
[src]
fn to_superset(&self) -> Matrix3<N2>
[src]
fn is_in_subset(m: &Matrix3<N2>) -> bool
[src]
unsafe fn from_superset_unchecked(m: &Matrix3<N2>) -> Self
[src]
fn from_superset(element: &T) -> Option<Self>
[src]
The inverse inclusion map: attempts to construct self
from the equivalent element of its superset. Read more
impl<N: RealField> DirectIsometry<Point<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2>,
[src]
DefaultAllocator: Allocator<N, U2>,
impl<N: RealField> OrthogonalTransformation<Point<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2>,
[src]
DefaultAllocator: Allocator<N, U2>,
impl<N: RealField> Transformation<Point<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2>,
[src]
DefaultAllocator: Allocator<N, U2>,
fn transform_point(&self, pt: &Point2<N>) -> Point2<N>
[src]
fn transform_vector(&self, v: &Vector2<N>) -> Vector2<N>
[src]
impl<N: RealField> Rotation<Point<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2>,
[src]
DefaultAllocator: Allocator<N, U2>,
fn powf(&self, n: N) -> Option<Self>
[src]
fn rotation_between(a: &Vector2<N>, b: &Vector2<N>) -> Option<Self>
[src]
fn scaled_rotation_between(a: &Vector2<N>, b: &Vector2<N>, s: N) -> Option<Self>
[src]
impl<N: RealField> AffineTransformation<Point<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2>,
[src]
DefaultAllocator: Allocator<N, U2>,
type Rotation = Self
Type of the first rotation to be applied.
type NonUniformScaling = Id
Type of the non-uniform scaling to be applied.
type Translation = Id
The type of the pure translation part of this affine transformation.
fn decompose(&self) -> (Id, Self, Id, Self)
[src]
fn append_translation(&self, _: &Self::Translation) -> Self
[src]
fn prepend_translation(&self, _: &Self::Translation) -> Self
[src]
fn append_rotation(&self, r: &Self::Rotation) -> Self
[src]
fn prepend_rotation(&self, r: &Self::Rotation) -> Self
[src]
fn append_scaling(&self, _: &Self::NonUniformScaling) -> Self
[src]
fn prepend_scaling(&self, _: &Self::NonUniformScaling) -> Self
[src]
fn append_rotation_wrt_point(&self, r: &Self::Rotation, p: &E) -> Option<Self>
[src]
Appends to this similarity a rotation centered at the point p
, i.e., this point is left invariant. Read more
impl<N: RealField> Isometry<Point<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2>,
[src]
DefaultAllocator: Allocator<N, U2>,
impl<N: RealField> Similarity<Point<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2>,
[src]
DefaultAllocator: Allocator<N, U2>,
type Scaling = Id
The type of the pure (uniform) scaling part of this similarity transformation.
fn translation(&self) -> Id
[src]
fn rotation(&self) -> Self
[src]
fn scaling(&self) -> Id
[src]
fn translate_point(&self, pt: &E) -> E
[src]
Applies this transformation's pure translational part to a point.
fn rotate_point(&self, pt: &E) -> E
[src]
Applies this transformation's pure rotational part to a point.
fn scale_point(&self, pt: &E) -> E
[src]
Applies this transformation's pure scaling part to a point.
fn rotate_vector(
&self,
pt: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
[src]
&self,
pt: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
Applies this transformation's pure rotational part to a vector.
fn scale_vector(
&self,
pt: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
[src]
&self,
pt: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
Applies this transformation's pure scaling part to a vector.
fn inverse_translate_point(&self, pt: &E) -> E
[src]
Applies this transformation inverse's pure translational part to a point.
fn inverse_rotate_point(&self, pt: &E) -> E
[src]
Applies this transformation inverse's pure rotational part to a point.
fn inverse_scale_point(&self, pt: &E) -> E
[src]
Applies this transformation inverse's pure scaling part to a point.
fn inverse_rotate_vector(
&self,
pt: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
[src]
&self,
pt: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
Applies this transformation inverse's pure rotational part to a vector.
fn inverse_scale_vector(
&self,
pt: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
[src]
&self,
pt: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
Applies this transformation inverse's pure scaling part to a vector.
impl<N: RealField> ProjectiveTransformation<Point<N, U2>> for UnitComplex<N> where
DefaultAllocator: Allocator<N, U2>,
[src]
DefaultAllocator: Allocator<N, U2>,