Struct ga2::Rotor

source · []
pub struct Rotor<T> {
    pub scalar: T,
    pub xy: T,
}
Expand description

The 2D bivector type.

Fields

scalar: T

The scalar component.

xy: T

The component representing the xy plane.

Implementations

Creates a new rotor from its components.

Rotates a vector by the rotor.

Rotates a vector by the rotor. The rotor has to be normalized already.

The reverse of the rotor.

Creates a new scalar rotor.

Creates a new rotor along the xy plane.

Trait Implementations

The resulting type after applying the + operator.
Performs the + operation. Read more
Performs the += operation. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
The output type of the dot product.
The dot product.
The output type of the dot product.
The dot product.
The output type of the dot product.
The dot product.
The output type of the dot product.
The dot product.
The output type of the dot product.
The dot product.
Converts to this type from the input type.
The scalar product.
The squared magnitude. Read more
The magnitude of a vector.
The normalized vector.
The angle between two vectors.
Sets the magnitude of a vector.
Sets the direction of a vector.
The value of the vector along the specified axis.
Projects a vector onto an already normalized direction vector.
Projects a vector onto an arbitraty direction vector.
Rejects a vector from an already normalized direction vector.
Rejects a vector from an arbitraty direction vector.
Reflects a vector from an already normalized direction vector.
Reflects a vector from an arbitraty direction vector.
The result after applying the operator.
Returns the multiplicative inverse of self. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
The resulting type after applying the - operator.
Performs the unary - operation. Read more
Returns the multiplicative identity element of Self, 1. Read more
Returns true if self is equal to the multiplicative identity. Read more
Sets self to the multiplicative identity element of Self, 1.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
Performs the -= operation. Read more
The scalar type of the vector space.
Returns the additive identity element of Self, 0. Read more
Returns true if self is equal to the additive identity.
Sets self to the additive identity element of Self, 0.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Creates the specified unit basis of the vector space.
Creates the specified basis of the vector of the specified magnitude.
Queries the specified basis of a vector space.
Queries the specified basis of a vector space as a mutable reference.
Creates a new vector with the specified basis set to a different value.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.