Enum lowdim::Sym2d[][src]

pub enum Sym2d {
    R(u8),
    S(u8),
}
Expand description

The symmetries of discrete 2d vectors.

These preserve length and the origin, and correspond to multiplication with orthogonal integer matrices. This can be viewed as a concise representation of the orthogonal matrices, conversion is possible via Matrix2d::from.

This is the dihedral group D4, the symmetry group of a square. It consists of four rotations and four reflections.

Variants

R(u8)

Tuple Fields

0: u8

Rotates by the given number of right angles to the left.

S(u8)

Tuple Fields

0: u8

Reflects by an axis through the origin so that the point (1, 0) is rotated by the given number of right angles to the left.

The axis of reflection then forms an angle of 45 degrees times the given number with the x axis.

Implementations

Returns a vector containing the elements of the symmetry group.

Returns a vector containing the rotations of the symmetry group.

The rotations are closed under multiplication. That is, they form a subgroup.

Returns the inverse of an element.

Returns true if this a rotation.

Returns true if this a reflection.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. 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

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. 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.