Type Alias nalgebra::geometry::UnitComplex

source ·
pub type UnitComplex<T> = Unit<Complex<T>>;
Expand description

Aliased Type§

struct UnitComplex<T> { /* private fields */ }

Implementations§

source§

impl<T: SimdRealField> UnitComplex<T>

§Angle extraction

source

pub fn angle(&self) -> T

The rotation angle in ]-pi; pi] of this unit complex number.

§Example
let rot = UnitComplex::new(1.78);
assert_eq!(rot.angle(), 1.78);
source

pub fn sin_angle(&self) -> T

The sine of the rotation angle.

§Example
let angle = 1.78f32;
let rot = UnitComplex::new(angle);
assert_eq!(rot.sin_angle(), angle.sin());
source

pub fn cos_angle(&self) -> T

The cosine of the rotation angle.

§Example
let angle = 1.78f32;
let rot = UnitComplex::new(angle);
assert_eq!(rot.cos_angle(),angle.cos());
source

pub fn scaled_axis(&self) -> Vector1<T>

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.

source

pub fn axis_angle(&self) -> Option<(Unit<Vector1<T>>, T)>
where T: RealField,

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.

source

pub fn angle_to(&self, other: &Self) -> T

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);
source§

impl<T: SimdRealField> UnitComplex<T>

§Conjugation and inversion

source

pub fn conjugate(&self) -> Self

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);
source

pub fn inverse(&self) -> Self

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);
source

pub fn conjugate_mut(&mut self)

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);
source

pub fn inverse_mut(&mut self)

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());
source§

impl<T: SimdRealField> UnitComplex<T>

§Conversion to a matrix

source

pub fn to_rotation_matrix(self) -> Rotation2<T>

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);
source

pub fn to_homogeneous(self) -> Matrix3<T>

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);
source§

impl<T: SimdRealField> UnitComplex<T>

§Transformation of a vector or a point

source

pub fn transform_point(&self, pt: &Point2<T>) -> Point2<T>

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);
source

pub fn transform_vector(&self, v: &Vector2<T>) -> Vector2<T>

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);
source

pub fn inverse_transform_point(&self, pt: &Point2<T>) -> Point2<T>

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);
source

pub fn inverse_transform_vector(&self, v: &Vector2<T>) -> Vector2<T>

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);
source

pub fn inverse_transform_unit_vector( &self, v: &Unit<Vector2<T>> ) -> Unit<Vector2<T>>

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_unit_vector(&Vector2::x_axis());
assert_relative_eq!(transformed_vector, -Vector2::y_axis(), epsilon = 1.0e-6);
source§

impl<T: SimdRealField> UnitComplex<T>

§Interpolation

source

pub fn slerp(&self, other: &Self, t: T) -> Self

Spherical linear interpolation between two rotations represented as unit complex numbers.

§Examples:

let rot1 = UnitComplex::new(std::f32::consts::FRAC_PI_4);
let rot2 = UnitComplex::new(-std::f32::consts::PI);

let rot = rot1.slerp(&rot2, 1.0 / 3.0);

assert_relative_eq!(rot.angle(), std::f32::consts::FRAC_PI_2);
source§

impl<T: SimdRealField> UnitComplex<T>

§Identity

source

pub fn identity() -> Self

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);
source§

impl<T: SimdRealField> UnitComplex<T>

§Construction from a 2D rotation angle

source

pub fn new(angle: T) -> Self

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));
source

pub fn from_angle(angle: T) -> Self

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));
source

pub fn from_cos_sin_unchecked(cos: T, sin: T) -> Self

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));
source

pub fn from_scaled_axis<SB: Storage<T, U1>>( axisangle: Vector<T, 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.

source§

impl<T: SimdRealField> UnitComplex<T>

§Construction from an existing 2D matrix or complex number

source

pub fn cast<To: Scalar>(self) -> UnitComplex<To>
where UnitComplex<To>: SupersetOf<Self>,

Cast the components of self to another type.

§Example
#[macro_use] extern crate approx;
let c = UnitComplex::new(1.0f64);
let c2 = c.cast::<f32>();
assert_relative_eq!(c2, UnitComplex::new(1.0f32));
source

pub fn complex(&self) -> &Complex<T>

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()));
source

pub fn from_complex(q: Complex<T>) -> Self

Creates a new unit complex number from a complex number.

The input complex number will be normalized.

source

pub fn from_complex_and_get(q: Complex<T>) -> (Self, T)

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.

source

pub fn from_rotation_matrix(rotmat: &Rotation2<T>) -> Self

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));
source

pub fn from_basis_unchecked(basis: &[Vector2<T>; 2]) -> Self

Builds a rotation from a basis assumed to be orthonormal.

In order to get a valid unit-quaternion, the input must be an orthonormal basis, i.e., all vectors are normalized, and the are all orthogonal to each other. These invariants are not checked by this method.

source

pub fn from_matrix(m: &Matrix2<T>) -> Self
where T: RealField,

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.

source

pub fn from_matrix_eps( m: &Matrix2<T>, eps: T, max_iter: usize, guess: Self ) -> Self
where T: RealField,

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 to 0.
  • 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 to UnitQuaternion::identity() if no other guesses come to mind.
source

pub fn rotation_to(&self, other: &Self) -> Self

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);
source

pub fn powf(&self, n: T) -> Self

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);
source§

impl<T: SimdRealField> UnitComplex<T>

§Construction from two vectors

source

pub fn rotation_between<SB, SC>( a: &Vector<T, U2, SB>, b: &Vector<T, U2, SC> ) -> Self
where T: RealField, SB: Storage<T, U2>, SC: Storage<T, 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);
source

pub fn scaled_rotation_between<SB, SC>( a: &Vector<T, U2, SB>, b: &Vector<T, U2, SC>, s: T ) -> Self
where T: RealField, SB: Storage<T, U2>, SC: Storage<T, 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);
source

pub fn rotation_between_axis<SB, SC>( a: &Unit<Vector<T, U2, SB>>, b: &Unit<Vector<T, U2, SC>> ) -> Self
where SB: Storage<T, U2>, SC: Storage<T, 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);
source

pub fn scaled_rotation_between_axis<SB, SC>( na: &Unit<Vector<T, U2, SB>>, nb: &Unit<Vector<T, U2, SC>>, s: T ) -> Self
where SB: Storage<T, U2>, SC: Storage<T, 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§

source§

impl<T: RealField> AbsDiffEq for UnitComplex<T>

§

type Epsilon = T

Used for specifying relative comparisons.
source§

fn default_epsilon() -> Self::Epsilon

The default tolerance to use when testing values that are close together. Read more
source§

fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool

A test for equality that uses the absolute difference to compute the approximate equality of two numbers.
source§

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

The inverse of AbsDiffEq::abs_diff_eq.
source§

impl<T: SimdRealField> AbstractRotation<T, 2> for UnitComplex<T>

source§

fn identity() -> Self

The rotation identity.
source§

fn inverse(&self) -> Self

The rotation inverse.
source§

fn inverse_mut(&mut self)

Change self to its inverse.
source§

fn transform_vector(&self, v: &SVector<T, 2>) -> SVector<T, 2>

Apply the rotation to the given vector.
source§

fn transform_point(&self, p: &Point<T, 2>) -> Point<T, 2>

Apply the rotation to the given point.
source§

fn inverse_transform_vector(&self, v: &SVector<T, 2>) -> SVector<T, 2>

Apply the inverse rotation to the given vector.
source§

fn inverse_transform_point(&self, p: &Point<T, 2>) -> Point<T, 2>

Apply the inverse rotation to the given point.
source§

fn inverse_transform_unit_vector( &self, v: &Unit<SVector<T, D>> ) -> Unit<SVector<T, D>>

Apply the inverse rotation to the given unit vector.
source§

impl<T: SimdRealField> Default for UnitComplex<T>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<T: RealField + Display> Display for UnitComplex<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, 'b, T: SimdRealField> Div<&'b Rotation<T, 2>> for &'a UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the / operator.
source§

fn div(self, rhs: &'b Rotation<T, 2>) -> Self::Output

Performs the / operation. Read more
source§

impl<'b, T: SimdRealField> Div<&'b Rotation<T, 2>> for UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the / operator.
source§

fn div(self, rhs: &'b Rotation<T, 2>) -> Self::Output

Performs the / operation. Read more
source§

impl<'a, 'b, T: SimdRealField> Div<&'b Unit<Complex<T>>> for &'a UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the / operator.
source§

fn div(self, rhs: &'b UnitComplex<T>) -> Self::Output

Performs the / operation. Read more
source§

impl<'b, T: SimdRealField> Div<&'b Unit<Complex<T>>> for UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the / operator.
source§

fn div(self, rhs: &'b UnitComplex<T>) -> Self::Output

Performs the / operation. Read more
source§

impl<'a, T: SimdRealField> Div<Rotation<T, 2>> for &'a UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the / operator.
source§

fn div(self, rhs: Rotation<T, 2>) -> Self::Output

Performs the / operation. Read more
source§

impl<T: SimdRealField> Div<Rotation<T, 2>> for UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the / operator.
source§

fn div(self, rhs: Rotation<T, 2>) -> Self::Output

Performs the / operation. Read more
source§

impl<'a, T: SimdRealField> Div<Unit<Complex<T>>> for &'a UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the / operator.
source§

fn div(self, rhs: UnitComplex<T>) -> Self::Output

Performs the / operation. Read more
source§

impl<T: SimdRealField> Div for UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
source§

impl<'b, T: SimdRealField> DivAssign<&'b Rotation<T, 2>> for UnitComplex<T>

source§

fn div_assign(&mut self, rhs: &'b Rotation<T, 2>)

Performs the /= operation. Read more
source§

impl<'b, T: SimdRealField> DivAssign<&'b Unit<Complex<T>>> for UnitComplex<T>

source§

fn div_assign(&mut self, rhs: &'b UnitComplex<T>)

Performs the /= operation. Read more
source§

impl<T: SimdRealField> DivAssign<Rotation<T, 2>> for UnitComplex<T>

source§

fn div_assign(&mut self, rhs: Rotation<T, 2>)

Performs the /= operation. Read more
source§

impl<T: SimdRealField> DivAssign for UnitComplex<T>

source§

fn div_assign(&mut self, rhs: UnitComplex<T>)

Performs the /= operation. Read more
source§

impl<T> From<[Unit<Complex<<T as SimdValue>::Element>>; 16]> for UnitComplex<T>

source§

fn from(arr: [UnitComplex<T::Element>; 16]) -> Self

Converts to this type from the input type.
source§

impl<T> From<[Unit<Complex<<T as SimdValue>::Element>>; 2]> for UnitComplex<T>
where T: From<[<T as SimdValue>::Element; 2]> + Scalar + Copy + PrimitiveSimdValue, T::Element: Scalar + Copy,

source§

fn from(arr: [UnitComplex<T::Element>; 2]) -> Self

Converts to this type from the input type.
source§

impl<T> From<[Unit<Complex<<T as SimdValue>::Element>>; 4]> for UnitComplex<T>
where T: From<[<T as SimdValue>::Element; 4]> + Scalar + Copy + PrimitiveSimdValue, T::Element: Scalar + Copy,

source§

fn from(arr: [UnitComplex<T::Element>; 4]) -> Self

Converts to this type from the input type.
source§

impl<T> From<[Unit<Complex<<T as SimdValue>::Element>>; 8]> for UnitComplex<T>
where T: From<[<T as SimdValue>::Element; 8]> + Scalar + Copy + PrimitiveSimdValue, T::Element: Scalar + Copy,

source§

fn from(arr: [UnitComplex<T::Element>; 8]) -> Self

Converts to this type from the input type.
source§

impl<T: SimdRealField> From<Rotation<T, 2>> for UnitComplex<T>

source§

fn from(q: Rotation2<T>) -> Self

Converts to this type from the input type.
source§

impl<'a, 'b, T: SimdRealField> Mul<&'b Isometry<T, Unit<Complex<T>>, 2>> for &'a UnitComplex<T>

§

type Output = Isometry<T, Unit<Complex<T>>, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Isometry<T, UnitComplex<T>, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'b, T: SimdRealField> Mul<&'b Isometry<T, Unit<Complex<T>>, 2>> for UnitComplex<T>

§

type Output = Isometry<T, Unit<Complex<T>>, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Isometry<T, UnitComplex<T>, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T: SimdRealField, S: Storage<T, Const<2>>> Mul<&'b Matrix<T, Const<2>, Const<1>, S>> for &'a UnitComplex<T>

§

type Output = Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Vector<T, Const<2>, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<'b, T: SimdRealField, S: Storage<T, Const<2>>> Mul<&'b Matrix<T, Const<2>, Const<1>, S>> for UnitComplex<T>

§

type Output = Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Vector<T, Const<2>, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T: SimdRealField> Mul<&'b OPoint<T, Const<2>>> for &'a UnitComplex<T>

§

type Output = OPoint<T, Const<2>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Point2<T>) -> Self::Output

Performs the * operation. Read more
source§

impl<'b, T: SimdRealField> Mul<&'b OPoint<T, Const<2>>> for UnitComplex<T>

§

type Output = OPoint<T, Const<2>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Point2<T>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T: SimdRealField> Mul<&'b Rotation<T, 2>> for &'a UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Rotation<T, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'b, T: SimdRealField> Mul<&'b Rotation<T, 2>> for UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Rotation<T, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T: SimdRealField> Mul<&'b Similarity<T, Unit<Complex<T>>, 2>> for &'a UnitComplex<T>

§

type Output = Similarity<T, Unit<Complex<T>>, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Similarity<T, UnitComplex<T>, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'b, T: SimdRealField> Mul<&'b Similarity<T, Unit<Complex<T>>, 2>> for UnitComplex<T>

§

type Output = Similarity<T, Unit<Complex<T>>, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Similarity<T, UnitComplex<T>, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T, C> Mul<&'b Transform<T, C, 2>> for &'a UnitComplex<T>

§

type Output = Transform<T, <C as TCategoryMul<TAffine>>::Representative, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Transform<T, C, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'b, T, C> Mul<&'b Transform<T, C, 2>> for UnitComplex<T>

§

type Output = Transform<T, <C as TCategoryMul<TAffine>>::Representative, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Transform<T, C, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T: SimdRealField> Mul<&'b Translation<T, 2>> for &'a UnitComplex<T>

§

type Output = Isometry<T, Unit<Complex<T>>, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Translation<T, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'b, T: SimdRealField> Mul<&'b Translation<T, 2>> for UnitComplex<T>

§

type Output = Isometry<T, Unit<Complex<T>>, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Translation<T, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T: SimdRealField> Mul<&'b Unit<Complex<T>>> for &'a UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b UnitComplex<T>) -> Self::Output

Performs the * operation. Read more
source§

impl<'b, T: SimdRealField> Mul<&'b Unit<Complex<T>>> for UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b UnitComplex<T>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, 'b, T: SimdRealField, S: Storage<T, Const<2>>> Mul<&'b Unit<Matrix<T, Const<2>, Const<1>, S>>> for &'a UnitComplex<T>

§

type Output = Unit<Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Unit<Vector<T, Const<2>, S>>) -> Self::Output

Performs the * operation. Read more
source§

impl<'b, T: SimdRealField, S: Storage<T, Const<2>>> Mul<&'b Unit<Matrix<T, Const<2>, Const<1>, S>>> for UnitComplex<T>

§

type Output = Unit<Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Unit<Vector<T, Const<2>, S>>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: SimdRealField> Mul<Isometry<T, Unit<Complex<T>>, 2>> for &'a UnitComplex<T>

§

type Output = Isometry<T, Unit<Complex<T>>, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Isometry<T, UnitComplex<T>, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: SimdRealField> Mul<Isometry<T, Unit<Complex<T>>, 2>> for UnitComplex<T>

§

type Output = Isometry<T, Unit<Complex<T>>, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Isometry<T, UnitComplex<T>, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: SimdRealField, S: Storage<T, Const<2>>> Mul<Matrix<T, Const<2>, Const<1>, S>> for &'a UnitComplex<T>

§

type Output = Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Vector<T, Const<2>, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: SimdRealField, S: Storage<T, Const<2>>> Mul<Matrix<T, Const<2>, Const<1>, S>> for UnitComplex<T>

§

type Output = Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Vector<T, Const<2>, S>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: SimdRealField> Mul<OPoint<T, Const<2>>> for &'a UnitComplex<T>

§

type Output = OPoint<T, Const<2>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Point2<T>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: SimdRealField> Mul<OPoint<T, Const<2>>> for UnitComplex<T>

§

type Output = OPoint<T, Const<2>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Point2<T>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: SimdRealField> Mul<Rotation<T, 2>> for &'a UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Rotation<T, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: SimdRealField> Mul<Rotation<T, 2>> for UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Rotation<T, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: SimdRealField> Mul<Similarity<T, Unit<Complex<T>>, 2>> for &'a UnitComplex<T>

§

type Output = Similarity<T, Unit<Complex<T>>, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Similarity<T, UnitComplex<T>, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: SimdRealField> Mul<Similarity<T, Unit<Complex<T>>, 2>> for UnitComplex<T>

§

type Output = Similarity<T, Unit<Complex<T>>, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Similarity<T, UnitComplex<T>, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T, C> Mul<Transform<T, C, 2>> for &'a UnitComplex<T>

§

type Output = Transform<T, <C as TCategoryMul<TAffine>>::Representative, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Transform<T, C, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<T, C> Mul<Transform<T, C, 2>> for UnitComplex<T>

§

type Output = Transform<T, <C as TCategoryMul<TAffine>>::Representative, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Transform<T, C, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: SimdRealField> Mul<Translation<T, 2>> for &'a UnitComplex<T>

§

type Output = Isometry<T, Unit<Complex<T>>, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Translation<T, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: SimdRealField> Mul<Translation<T, 2>> for UnitComplex<T>

§

type Output = Isometry<T, Unit<Complex<T>>, 2>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Translation<T, 2>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: SimdRealField> Mul<Unit<Complex<T>>> for &'a UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: UnitComplex<T>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: SimdRealField, S: Storage<T, Const<2>>> Mul<Unit<Matrix<T, Const<2>, Const<1>, S>>> for &'a UnitComplex<T>

§

type Output = Unit<Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Unit<Vector<T, Const<2>, S>>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: SimdRealField, S: Storage<T, Const<2>>> Mul<Unit<Matrix<T, Const<2>, Const<1>, S>>> for UnitComplex<T>

§

type Output = Unit<Matrix<T, Const<2>, Const<1>, ArrayStorage<T, 2, 1>>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Unit<Vector<T, Const<2>, S>>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: SimdRealField> Mul for UnitComplex<T>

§

type Output = Unit<Complex<T>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self

Performs the * operation. Read more
source§

impl<'b, T: SimdRealField> MulAssign<&'b Rotation<T, 2>> for UnitComplex<T>

source§

fn mul_assign(&mut self, rhs: &'b Rotation<T, 2>)

Performs the *= operation. Read more
source§

impl<'b, T: SimdRealField> MulAssign<&'b Unit<Complex<T>>> for UnitComplex<T>

source§

fn mul_assign(&mut self, rhs: &'b UnitComplex<T>)

Performs the *= operation. Read more
source§

impl<T: SimdRealField> MulAssign<Rotation<T, 2>> for UnitComplex<T>

source§

fn mul_assign(&mut self, rhs: Rotation<T, 2>)

Performs the *= operation. Read more
source§

impl<T: SimdRealField> MulAssign for UnitComplex<T>

source§

fn mul_assign(&mut self, rhs: UnitComplex<T>)

Performs the *= operation. Read more
source§

impl<T: SimdRealField> One for UnitComplex<T>

source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
source§

fn is_one(&self) -> bool
where Self: PartialEq,

Returns true if self is equal to the multiplicative identity. Read more
source§

impl<T: Scalar + PartialEq> PartialEq for UnitComplex<T>

source§

fn eq(&self, rhs: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: RealField> RelativeEq for UnitComplex<T>

source§

fn default_max_relative() -> Self::Epsilon

The default relative tolerance for testing values that are far-apart. Read more
source§

fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool

A test for equality that uses a relative comparison if the values are far apart.
source§

fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool

The inverse of RelativeEq::relative_eq.
source§

impl<T: SimdRealField> SimdValue for UnitComplex<T>

§

type Element = Unit<Complex<<T as SimdValue>::Element>>

The type of the elements of each lane of this SIMD value.
§

type SimdBool = <T as SimdValue>::SimdBool

Type of the result of comparing two SIMD values like self.
source§

fn lanes() -> usize

The number of lanes of this SIMD value.
source§

fn splat(val: Self::Element) -> Self

Initializes an SIMD value with each lanes set to val.
source§

fn extract(&self, i: usize) -> Self::Element

Extracts the i-th lane of self. Read more
source§

unsafe fn extract_unchecked(&self, i: usize) -> Self::Element

Extracts the i-th lane of self without bound-checking.
source§

fn replace(&mut self, i: usize, val: Self::Element)

Replaces the i-th lane of self by val. Read more
source§

unsafe fn replace_unchecked(&mut self, i: usize, val: Self::Element)

Replaces the i-th lane of self by val without bound-checking.
source§

fn select(self, cond: Self::SimdBool, other: Self) -> Self

Merges self and other depending on the lanes of cond. Read more
source§

fn map_lanes(self, f: impl Fn(Self::Element) -> Self::Element) -> Self
where Self: Clone,

Applies a function to each lane of self. Read more
source§

fn zip_map_lanes( self, b: Self, f: impl Fn(Self::Element, Self::Element) -> Self::Element ) -> Self
where Self: Clone,

Applies a function to each lane of self paired with the corresponding lane of b. Read more
source§

impl<T1, T2, R> SubsetOf<Isometry<T2, R, 2>> for UnitComplex<T1>
where T1: RealField, T2: RealField + SupersetOf<T1>, R: AbstractRotation<T2, 2> + SupersetOf<Self>,

source§

fn to_superset(&self) -> Isometry<T2, R, 2>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset(iso: &Isometry<T2, R, 2>) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked(iso: &Isometry<T2, R, 2>) -> Self

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
source§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1: RealField, T2: RealField + SupersetOf<T1>> SubsetOf<Matrix<T2, Const<3>, Const<3>, ArrayStorage<T2, 3, 3>>> for UnitComplex<T1>

source§

fn to_superset(&self) -> Matrix3<T2>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset(m: &Matrix3<T2>) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked(m: &Matrix3<T2>) -> Self

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
source§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1, T2> SubsetOf<Rotation<T2, 2>> for UnitComplex<T1>
where T1: RealField, T2: RealField + SupersetOf<T1>,

source§

fn to_superset(&self) -> Rotation2<T2>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset(rot: &Rotation2<T2>) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked(rot: &Rotation2<T2>) -> Self

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
source§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1, T2, R> SubsetOf<Similarity<T2, R, 2>> for UnitComplex<T1>
where T1: RealField, T2: RealField + SupersetOf<T1>, R: AbstractRotation<T2, 2> + SupersetOf<Self>,

source§

fn to_superset(&self) -> Similarity<T2, R, 2>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset(sim: &Similarity<T2, R, 2>) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked(sim: &Similarity<T2, R, 2>) -> Self

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
source§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1, T2, C> SubsetOf<Transform<T2, C, 2>> for UnitComplex<T1>

source§

fn to_superset(&self) -> Transform<T2, C, 2>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset(t: &Transform<T2, C, 2>) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked(t: &Transform<T2, C, 2>) -> Self

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
source§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T1, T2> SubsetOf<Unit<Complex<T2>>> for UnitComplex<T1>
where T1: RealField, T2: RealField + SupersetOf<T1>,

source§

fn to_superset(&self) -> UnitComplex<T2>

The inclusion map: converts self to the equivalent element of its superset.
source§

fn is_in_subset(uq: &UnitComplex<T2>) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked(uq: &UnitComplex<T2>) -> Self

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
source§

fn from_superset(element: &T) -> Option<Self>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

impl<T: RealField> UlpsEq for UnitComplex<T>

source§

fn default_max_ulps() -> u32

The default ULPs to tolerate when testing values that are far-apart. Read more
source§

fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool

A test for equality that uses units in the last place (ULP) if the values are far apart.
source§

fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of UlpsEq::ulps_eq.
source§

impl<T: Scalar + Eq> Eq for UnitComplex<T>