#[repr(u8)]pub enum CubeSurfacePoint {
Show 48 variants
PosOnePosTwoPosThree = 0,
PosOnePosTwoNegThree = 1,
PosOneNegTwoPosThree = 2,
PosOneNegTwoNegThree = 3,
NegOnePosTwoPosThree = 4,
NegOnePosTwoNegThree = 5,
NegOneNegTwoPosThree = 6,
NegOneNegTwoNegThree = 7,
PosThreePosTwoPosOne = 8,
PosThreePosTwoNegOne = 9,
PosThreeNegTwoPosOne = 10,
PosThreeNegTwoNegOne = 11,
NegThreePosTwoPosOne = 12,
NegThreePosTwoNegOne = 13,
NegThreeNegTwoPosOne = 14,
NegThreeNegTwoNegOne = 15,
PosOnePosThreePosTwo = 16,
PosOnePosThreeNegTwo = 17,
PosOneNegThreePosTwo = 18,
PosOneNegThreeNegTwo = 19,
NegOnePosThreePosTwo = 20,
NegOnePosThreeNegTwo = 21,
NegOneNegThreePosTwo = 22,
NegOneNegThreeNegTwo = 23,
PosThreePosOnePosTwo = 24,
PosThreePosOneNegTwo = 25,
PosThreeNegOnePosTwo = 26,
PosThreeNegOneNegTwo = 27,
NegThreePosOnePosTwo = 28,
NegThreePosOneNegTwo = 29,
NegThreeNegOnePosTwo = 30,
NegThreeNegOneNegTwo = 31,
PosTwoPosOnePosThree = 32,
PosTwoPosOneNegThree = 33,
PosTwoNegOnePosThree = 34,
PosTwoNegOneNegThree = 35,
NegTwoPosOnePosThree = 36,
NegTwoPosOneNegThree = 37,
NegTwoNegOnePosThree = 38,
NegTwoNegOneNegThree = 39,
PosTwoPosThreePosOne = 40,
PosTwoPosThreeNegOne = 41,
PosTwoNegThreePosOne = 42,
PosTwoNegThreeNegOne = 43,
NegTwoPosThreePosOne = 44,
NegTwoPosThreeNegOne = 45,
NegTwoNegThreePosOne = 46,
NegTwoNegThreeNegOne = 47,
}Expand description
Encodes the 48 possible points in space whose coördinates, in
ascending order of absolute value, are equal to [1, 2, 3].
Uses 6 bits, and is therefore represented as a u8.
§Usage
let test = PosOnePosTwoPosThree;
assert_eq!(test as u8, 0);§Representation
The bits of each encoding correspond one-by-one to the
Elementary Reflections that have to happen to the Reference Point in order
to produce the result we want. The documentation for the Rotation
data-type contains more details.
§Geometric Groups
A very important property is that those points can be divided into
two geometric categories, depending on whether the amount of ones in their
binary representation is odd or even. In each group, each CubeSurfacePoint
can be made to coincide with any other point using just one rotation. For it
to coincide with a point from the other group, however, it’d also require a
reflection, or what’s called an “improper rotation” or “rotoreflection”.
The ReferenceGroupPoint and OppositeGroupPoint data-types separate
the two, and respectively correspond to the ProperRotation and
ImproperRotation transformation data-types.
Below please find each possible point, along with the transformation to
which it corresponds. The signs for the rotations have been chosen in
accordance with the nalgebra crate.
Variants§
PosOnePosTwoPosThree = 0
The point [1, 2, 3]. Also the Point of Reference. Divided by itself,
it yields –unsurprisingly enough– the identity operation.
PosOnePosTwoNegThree = 1
The point [1, 2, -3]. Divided by the Reference Point, it yields a
reflection through the z = 0 plane. Its arithmetic representation is
equal to 20, thus it is the zeroth Elementary Reflection.
PosOneNegTwoPosThree = 2
The point [1, -2, 3]. Divided by the Reference Point, it yields a
reflection through the y = 0 plane. Its arithmetic representation is
equal to 21, thus it is the first Elementary Reflection.
PosOneNegTwoNegThree = 3
The point [1, -2, -3]. Divided by the Reference Point, it yields a
rotation of 180° around the x axis.
NegOnePosTwoPosThree = 4
The point [-1, 2, 3]. Divided by the Reference Point, it yields a
reflection through the x = 0 plane. Its arithmetic representation is
equal to 22, thus it is the second Elementary Reflection.
NegOnePosTwoNegThree = 5
The point [-1, 2, -3]. Divided by the Reference Point, it yields a
rotation of 180° around the y axis.
NegOneNegTwoPosThree = 6
The point [-1, -2, 3]. Divided by the Reference Point, it yields a
rotation of 180° around the z axis.
NegOneNegTwoNegThree = 7
The point [-1, -2, -3]. Divided by the Reference Point, it yields a
complete central inversion, ie a negation of all coördinates.
PosThreePosTwoPosOne = 8
The point [3, 2, 1]. Divided by the Reference Point, it yields a
reflection through the x = z plane. Its arithmetic representation is
equal to 23, thus it is the third Elementary Reflection.
PosThreePosTwoNegOne = 9
The point [3, 2, -1]. Divided by the Reference Point, it yields a
rotation of 90° around the y axis.
PosThreeNegTwoPosOne = 10
The point [3, -2, 1]. Divided by the Reference Point, it yields a
rotation of 180° around the y = 0, z = x axis.
PosThreeNegTwoNegOne = 11
The point [3, -2, -1]. Divided by the Reference Point, it yields a
rotoreflection of 90° with respect to the y axis.
NegThreePosTwoPosOne = 12
The point [-3, 2, 1]. Divided by the Reference Point, it yields a
rotation of -90° around the y axis.
NegThreePosTwoNegOne = 13
The point [-3, 2, -1]. Divided by the Reference Point, it yields a
reflection through the z = -x plane.
NegThreeNegTwoPosOne = 14
The point [-3, -2, 1]. Divided by the Reference Point, it yields a
rotoreflection of -90° with respect to the y axis.
NegThreeNegTwoNegOne = 15
The point [-3, -2, -1]. Divided by the Reference Point, it yields a
rotation of 180° around the y = 0, z = -x axis.
PosOnePosThreePosTwo = 16
The point [1, 3, 2]. Divided by the Reference Point, it yields a
reflection through the z = y plane. Its arithmetic representation is
equal to 24, thus it is the fourth Elementary Reflection.
PosOnePosThreeNegTwo = 17
The point [1, 3, -2]. Divided by the Reference Point, it yields a
rotation of -90° around the x axis.
PosOneNegThreePosTwo = 18
The point [1, -3, 2]. Divided by the Reference Point, it yields a
rotation of 90° around the x axis.
PosOneNegThreeNegTwo = 19
The point [1, -3, -2]. Divided by the Reference Point, it yields a
reflection through the y = -z plane.
NegOnePosThreePosTwo = 20
The point [-1, 3, 2]. Divided by the Reference Point, it yields a
rotation of 180° around the x = 0, y = z axis.
NegOnePosThreeNegTwo = 21
The point [-1, 3, -2]. Divided by the Reference Point, it yields a
rotoreflection of -90° with respect to the x = y = z axis.
NegOneNegThreePosTwo = 22
The point [-1, -3, 2]. Divided by the Reference Point, it yields a
rotoreflection of 90° with respect to the x axis.
NegOneNegThreeNegTwo = 23
The point [-1, -3, -2]. Divided by the Reference Point, it yields a
rotation of 180° around the x = 0, y = -z axis.
PosThreePosOnePosTwo = 24
The point [3, 1, 2]. Divided by the Reference Point, it yields a
rotation of 120° around the x = y = z axis.
PosThreePosOneNegTwo = 25
The point [3, 1, -2]. Divided by the Reference Point, it yields a
rotoreflection of -60° with respect to the x = -y = -z axis.
PosThreeNegOnePosTwo = 26
The point [3, -1, 2]. Divided by the Reference Point, it yields a
rotoreflection of 60° with respect to the x = y = -z axis.
PosThreeNegOneNegTwo = 27
The point [3, -1, -2]. Divided by the Reference Point, it yields a
rotation of -120° around the x = -y = z axis.
NegThreePosOnePosTwo = 28
The point [-3, 1, 2]. Divided by the Reference Point, it yields a
rotoreflection of 60° with respect to the x = -y = z axis.
NegThreePosOneNegTwo = 29
The point [-3, 1, -2]. Divided by the Reference Point, it yields a
rotation of -120° around the x = y = -z axis.
NegThreeNegOnePosTwo = 30
The point [-3, -1, 2]. Divided by the Reference Point, it yields a
rotation of 120° around the x = -y = -z axis.
NegThreeNegOneNegTwo = 31
The point [-3, -1, -2]. Divided by the Reference Point, it yields a
rotoreflection of -60° with respect to the x = y = z axis.
PosTwoPosOnePosThree = 32
The point [2, 1, 3]. Divided by the Reference Point, it yields a
reflection through the y = x plane. Its arithmetic representation is
equal to 25, thus it is the fifth and final
Elementary Reflection.
PosTwoPosOneNegThree = 33
The point [2, 1, -3]. Divided by the Reference Point, it yields a
rotation of 180° around the z = 0, x = y axis.
PosTwoNegOnePosThree = 34
The point [2, -1, 3]. Divided by the Reference Point, it yields a
rotation of -90° around the z axis.
PosTwoNegOneNegThree = 35
The point [2, -1, -3]. Divided by the Reference Point, it yields a
reflection through the x = -y plane.
NegTwoPosOnePosThree = 36
The point [-2, 1, 3]. Divided by the Reference Point, it yields a
rotation of 90° around the z axis.
NegTwoPosOneNegThree = 37
The point [-2, 1, -3]. Divided by the Reference Point, it yields a
rotoreflection of 90° with respect to the z axis.
NegTwoNegOnePosThree = 38
The point [-2, -1, 3]. Divided by the Reference Point, it yields a
rotoreflection of -90° with respect to the z axis.
NegTwoNegOneNegThree = 39
The point [-2, -1, -3]. Divided by the Reference Point, it yields a
rotation of 180° around the z = 0, x = -y axis.
PosTwoPosThreePosOne = 40
The point [2, 3, 1]. Divided by the Reference Point, it yields a
rotation of -120° around the x = y = z axis.
PosTwoPosThreeNegOne = 41
The point [2, 3, -1]. Divided by the Reference Point, it yields a
rotoreflection of -60° with respect to the x = -y = z axis.
PosTwoNegThreePosOne = 42
The point [2, -3, 1]. Divided by the Reference Point, it yields a
rotoreflection of 60° with respect to the x = -y = -z axis.
PosTwoNegThreeNegOne = 43
The point [2, -3, -1]. Divided by the Reference Point, it yields a
rotation of 120° around the x = y = -z axis.
NegTwoPosThreePosOne = 44
The point [-2, 3, 1]. Divided by the Reference Point, it yields a
rotoreflection of -60° with respect to the x = y = -z axis.
NegTwoPosThreeNegOne = 45
The point [-2, 3, -1]. Divided by the Reference Point, it yields a
rotation of -120° around the x = -y = -z axis.
NegTwoNegThreePosOne = 46
The point [-2, -3, 1]. Divided by the Reference Point, it yields a
rotation of 120° around the x = -y = z axis.
NegTwoNegThreeNegOne = 47
The point [-2, -3, -1]. Divided by the Reference Point, it yields a
rotoreflection of 60° with respect to the x = y = z axis.
Implementations§
Source§impl CubeSurfacePoint
impl CubeSurfacePoint
Sourcepub const REFERENCE_POINT: Self
pub const REFERENCE_POINT: Self
The point chosen as a Reference Point, according to which all rotations are judged.
Its binary representation is 0 by definition.
The point [1, 2, 3] has been chosen as the Reference Point for this
crate, corresponding to CubeSurfacePoint::PosOnePosTwoPosThree.
Sourcepub const fn odd_ones(self) -> bool
pub const fn odd_ones(self) -> bool
Counts how many ones there are in the binary representation of a certain
CubeSurfacePoint, so it can be judged in which geometric group it
belongs.
assert_eq!(PosTwoNegThreeNegOne.odd_ones(), false);Sourcepub const fn even_ones(self) -> bool
pub const fn even_ones(self) -> bool
Equal to the negation of CubeSurfacePoint::odd_ones by definition.
Sourcepub const fn determine_group(
self: CubeSurfacePoint,
) -> Result<ReferenceGroupPoint, OppositeGroupPoint>
pub const fn determine_group( self: CubeSurfacePoint, ) -> Result<ReferenceGroupPoint, OppositeGroupPoint>
Discriminates a given CubeSurfacePoint depending on the geometric
group to which it belongs. If it belongs to the Reference Rotation
Group, it returns an Ok<ReferenceGroupPoint>, else it returns an
Err<OppositeGroupPoint>.
Sourcepub const fn determine_antigroup(
self: CubeSurfacePoint,
) -> Result<OppositeGroupPoint, ReferenceGroupPoint>
pub const fn determine_antigroup( self: CubeSurfacePoint, ) -> Result<OppositeGroupPoint, ReferenceGroupPoint>
The same as CubeSurfacePoint::determine_group(), but returns an Ok
value for OppositeGroupPoints and an Err value otherwise.
Sourcepub const fn opposite(self) -> Self
pub const fn opposite(self) -> Self
Returns the point in the corresponding position of the opposite side of the cube.
Basically, finds which coördinate has an absolute value of 3 and multiplies it by -1.
assert_eq!(PosOnePosTwoPosThree.opposite(), PosOnePosTwoNegThree);Sourcepub const fn beside(self) -> Self
pub const fn beside(self) -> Self
Returns the other point found in the same edge of the same face of the cube.
Basically, finds which coördinate has an absolute value of 1 and multiplies it by -1.
assert_eq!(PosOnePosTwoPosThree.beside(), NegOnePosTwoPosThree);Sourcepub const fn opposite_then_beside(self) -> Self
pub const fn opposite_then_beside(self) -> Self
Functionally identical to self.opposite().beside(), or
(equivalently) self.beside().opposite(). Implemented separately
for optimisation purposes, as
- It was useful for our purposes,
- It maintains the geometric group of its input, and
- It is way simpler to implement than either function separately.
Corresponds to a rotation of 180° as seen from the face to which the point is closest without being on.
assert_eq!(PosOnePosTwoPosThree.opposite_then_beside(), NegOnePosTwoNegThree);Sourcepub const fn beside_then_opposite(self) -> Self
pub const fn beside_then_opposite(self) -> Self
Different name for CubeSurfacePoint::opposite_then_beside.
Sourcepub const fn flip_sign_of_1(self) -> Self
pub const fn flip_sign_of_1(self) -> Self
Different name for CubeSurfacePoint::beside.
Sourcepub const fn flip_sign_of_2(self) -> Self
pub const fn flip_sign_of_2(self) -> Self
No idea if this if going to be useful, but it’s so easy to implement that we might as well do so for completeness.
Sourcepub const fn flip_sign_of_3(self) -> Self
pub const fn flip_sign_of_3(self) -> Self
Different name for the CubeSurfacePoint::opposite function.
Sourcepub const fn flip_1_and_3(self) -> Self
pub const fn flip_1_and_3(self) -> Self
Different name for CubeSurfacePoint::opposite_then_beside.
Corresponds to a rotation of 180° as seen from the face to which the point is closest without being on.
Sourcepub const fn flip_2_and_3(self) -> Self
pub const fn flip_2_and_3(self) -> Self
A rotation of 180° as seen from a face which the point is neither on nor close to.
Sourcepub const fn flip_1_and_2(self) -> Self
pub const fn flip_1_and_2(self) -> Self
A rotation of 180° as seen from the face on which the point is located.
Sourcepub const fn try_from_u8(x: u8) -> Option<Self>
pub const fn try_from_u8(x: u8) -> Option<Self>
A helper const function for turning u8s into CubeSurfacePoints.
Sourcepub const fn one_right_angle<const CLOCKWISE: bool>(self) -> Self
pub const fn one_right_angle<const CLOCKWISE: bool>(self) -> Self
Returns the CubeSurfacePoint which is positioned 90°
from self –clockwise or anti-clockwise depending on the const
parametre of the same name– as viewed from the edge on which both are
located.
Sourcepub const fn one_right_angle_cw(self) -> Self
pub const fn one_right_angle_cw(self) -> Self
Returns the CubeSurfacePoint which is positioned 90° clockwise
from self, as viewed from the edge on which both are located.
assert_eq!(random_point.direction(),
random_point.one_right_angle_cw().direction())Sourcepub const fn one_right_angle_acw(self) -> Self
pub const fn one_right_angle_acw(self) -> Self
Returns the CubeSurfacePoint which is positioned 90° anti-clockwise
from self, as viewed from the edge on which both are located.
assert_eq!(random_point.direction(),
random_point.one_right_angle_acw().direction())Sourcepub const fn n_right_angles<const CLOCKWISE: bool>(self, angle: u8) -> Self
pub const fn n_right_angles<const CLOCKWISE: bool>(self, angle: u8) -> Self
Returns the CubeSurfacePoint which is positioned (90 * n)°
from self –clockwise or anti-clockwise depending on the const
parametre of the same name–, as viewed from the edge on which both are
located.
Sourcepub const fn n_right_angles_cw(self, angle: u8) -> CubeSurfacePoint
pub const fn n_right_angles_cw(self, angle: u8) -> CubeSurfacePoint
Returns the CubeSurfacePoint which is positioned (90 * n)°
clockwise
from self, as viewed from the edge on which both are located.
let surface_point = PosOnePosTwoPosThree;
let rotated_1 = surface_point
.one_right_angle_cw()
.one_right_angle_cw();
let rotated_2 = surface_point
.n_right_angles_cw(2);
assert_eq!(rotated_1, rotated_2);Sourcepub const fn n_right_angles_acw(self, angle: u8) -> CubeSurfacePoint
pub const fn n_right_angles_acw(self, angle: u8) -> CubeSurfacePoint
Returns the CubeSurfacePoint which is positioned (90 * n)°
anti-clockwise
from self, as viewed from the edge on which both are located.
let surface_point = PosOnePosTwoPosThree;
let rotated_1 = surface_point
.one_right_angle_cw()
.one_right_angle_cw()
.one_right_angle_cw();
let rotated_2 = surface_point
.n_right_angles_acw(1);
assert_eq!(rotated_1, rotated_2);Sourcepub const fn direction(self) -> Direction
pub const fn direction(self) -> Direction
Returns the spatial direction towards which self is oriented.
Essentially finds which coördinate has an absolute value of 3, and judges by that.
assert_eq!(PosOnePosTwoPosThree.direction(), Up);
assert_eq!(PosOnePosTwoNegThree.direction(), Down);
assert_eq!(PosOnePosThreePosTwo.direction(), Front);
assert_eq!(PosOneNegThreePosTwo.direction(), Back);
assert_eq!(PosThreePosTwoPosOne.direction(), Right);
assert_eq!(NegThreePosTwoPosOne.direction(), Left);Trait Implementations§
Source§impl Clone for CubeSurfacePoint
impl Clone for CubeSurfacePoint
Source§fn clone(&self) -> CubeSurfacePoint
fn clone(&self) -> CubeSurfacePoint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CubeSurfacePoint
impl Debug for CubeSurfacePoint
Source§impl Div for CubeSurfacePoint
Extracts the rotation that must occur so that the divisor point ends up
coinciding with self, ie the dividend.
impl Div for CubeSurfacePoint
Extracts the rotation that must occur so that the divisor point ends up
coinciding with self, ie the dividend.
Source§impl<const BIG_LUTS: bool> From<CubeSurfacePoint<BIG_LUTS>> for CubeSurfacePoint
impl<const BIG_LUTS: bool> From<CubeSurfacePoint<BIG_LUTS>> for CubeSurfacePoint
Source§fn from(x: CubeSurfacePoint<BIG_LUTS>) -> Self
fn from(x: CubeSurfacePoint<BIG_LUTS>) -> Self
Source§impl<const BIG_LUTS: bool> From<CubeSurfacePoint> for CubeSurfacePoint<BIG_LUTS>
impl<const BIG_LUTS: bool> From<CubeSurfacePoint> for CubeSurfacePoint<BIG_LUTS>
Source§impl From<CubeSurfacePoint> for Rotation
impl From<CubeSurfacePoint> for Rotation
Source§fn from(corresponding_point: CubeSurfacePoint) -> Self
fn from(corresponding_point: CubeSurfacePoint) -> Self
Source§impl From<OppositeGroupPoint> for CratePt
Discards any knowledge of Geometric Group, producing a general
crate::CubeSurfacePoint.
impl From<OppositeGroupPoint> for CratePt
Discards any knowledge of Geometric Group, producing a general
crate::CubeSurfacePoint.
Source§fn from(x: OppositeGroupPoint) -> CratePt
fn from(x: OppositeGroupPoint) -> CratePt
Source§impl From<OppositeGroupPoint> for CubeSurfacePoint
Discards any knowledge of Geometric Group, producing a general
CubeSurfacePoint.
impl From<OppositeGroupPoint> for CubeSurfacePoint
Discards any knowledge of Geometric Group, producing a general
CubeSurfacePoint.
Source§fn from(x: OppositeGroupPoint) -> Self
fn from(x: OppositeGroupPoint) -> Self
Source§impl From<ReferenceGroupPoint> for CratePt
Discards any knowledge of Geometric Group, producing a general
crate::CubeSurfacePoint.
impl From<ReferenceGroupPoint> for CratePt
Discards any knowledge of Geometric Group, producing a general
crate::CubeSurfacePoint.
Source§fn from(x: ReferenceGroupPoint) -> CratePt
fn from(x: ReferenceGroupPoint) -> CratePt
Source§impl From<ReferenceGroupPoint> for CubeSurfacePoint
Discards any knowledge of Geometric Group, producing a general
CubeSurfacePoint.
impl From<ReferenceGroupPoint> for CubeSurfacePoint
Discards any knowledge of Geometric Group, producing a general
CubeSurfacePoint.
Source§fn from(x: ReferenceGroupPoint) -> Self
fn from(x: ReferenceGroupPoint) -> Self
Source§impl From<Rotation> for CubeSurfacePoint
impl From<Rotation> for CubeSurfacePoint
Source§impl Mul<CubeSurfacePoint> for Rotation
Rotates a given CubeSurfacePoint according to self.
impl Mul<CubeSurfacePoint> for Rotation
Rotates a given CubeSurfacePoint according to self.
Source§type Output = CubeSurfacePoint
type Output = CubeSurfacePoint
Output same as input.
Source§fn mul(self, cub_sur_pt: CubeSurfacePoint) -> Self::Output
fn mul(self, cub_sur_pt: CubeSurfacePoint) -> Self::Output
The operation is performed by examining self’s bits one by one, and
performing on the other surface_point the corresponding elementary
reflections.
Source§impl Mul<ImproperRotation> for CubeSurfacePoint
Rotates a copy of self in a way that switches its Geometric Group.
impl Mul<ImproperRotation> for CubeSurfacePoint
Rotates a copy of self in a way that switches its Geometric Group.
Source§type Output = CubeSurfacePoint
type Output = CubeSurfacePoint
Although the Geometric Group does change, CubeSurfacePoint does not
change its data-type depending on Geometric Group. Thus the data-type
remains the same.
Source§fn mul(self, rotation: ImproperRotation) -> Self
fn mul(self, rotation: ImproperRotation) -> Self
* operation. Read moreSource§impl Mul<ProperRotation> for CubeSurfacePoint
Rotates a copy of self in a way that maintains its Geometric Group.
impl Mul<ProperRotation> for CubeSurfacePoint
Rotates a copy of self in a way that maintains its Geometric Group.
Source§type Output = CubeSurfacePoint
type Output = CubeSurfacePoint
The Geometric Group doesn’t change. Even if it did, this data-type is group-agnostic.
Source§fn mul(self, rotation: ProperRotation) -> Self
fn mul(self, rotation: ProperRotation) -> Self
* operation. Read moreSource§impl Mul<Rotation> for CubeSurfacePoint
Rotates a copy of self per some Rotation.
impl Mul<Rotation> for CubeSurfacePoint
Rotates a copy of self per some Rotation.
Source§impl MulAssign<ImproperRotation> for CubeSurfacePoint
Rotates self in a way that switches its Geometric Group.
impl MulAssign<ImproperRotation> for CubeSurfacePoint
Rotates self in a way that switches its Geometric Group.
Source§fn mul_assign(&mut self, x: ImproperRotation)
fn mul_assign(&mut self, x: ImproperRotation)
The data-type remains the same, despite the Geometric Group changing. Thus, the result can be directly assigned.
Source§impl MulAssign<ProperRotation> for CubeSurfacePoint
Rotates self in a way that maintains its Geometric Group.
impl MulAssign<ProperRotation> for CubeSurfacePoint
Rotates self in a way that maintains its Geometric Group.
Source§fn mul_assign(&mut self, x: ProperRotation)
fn mul_assign(&mut self, x: ProperRotation)
Neither the Geometric Group nor the data-type change, so the result can be directly assigned.
Source§impl MulAssign<Rotation> for CubeSurfacePoint
Rotates self per some Rotation.
impl MulAssign<Rotation> for CubeSurfacePoint
Rotates self per some Rotation.
Source§fn mul_assign(&mut self, rot: Rotation)
fn mul_assign(&mut self, rot: Rotation)
The data-type doesn’t change, so the result can be directly assigned.
Source§impl OctahedrallySymmetricPoint for CubeSurfacePoint
impl OctahedrallySymmetricPoint for CubeSurfacePoint
Source§type OtherGroup = CubeSurfacePoint
type OtherGroup = CubeSurfacePoint
self belongs.Source§fn beside(self) -> Self::OtherGroup
fn beside(self) -> Self::OtherGroup
Source§fn opposite(self) -> Self::OtherGroup
fn opposite(self) -> Self::OtherGroup
Source§fn opposite_then_beside(self) -> Self
fn opposite_then_beside(self) -> Self
self.opposite().beside(). Also available
with the words swapped, as the order doesn’t matter. Read moreSource§fn one_right_angle_cw(self) -> Self
fn one_right_angle_cw(self) -> Self
self, as viewed from the face on which both are located.Source§fn one_right_angle_acw(self) -> Self
fn one_right_angle_acw(self) -> Self
self, as viewed from the face on which both are located.Source§fn flip_sign_of_2(self) -> Self::OtherGroup
fn flip_sign_of_2(self) -> Self::OtherGroup
Source§fn flip_2_and_3(self) -> Self
fn flip_2_and_3(self) -> Self
Source§fn n_right_angles_cw(self, angle: u8) -> Self
fn n_right_angles_cw(self, angle: u8) -> Self
self, as viewed from the face on which both are located.Source§fn n_right_angles_acw(self, angle: u8) -> Self
fn n_right_angles_acw(self, angle: u8) -> Self
self, as viewed from the face on which both are located.Source§fn odd_ones(self) -> bool
fn odd_ones(self) -> bool
Source§fn even_ones(self) -> bool
fn even_ones(self) -> bool
Self::odd_ones by definition.Source§fn n_right_angles<const CLOCKWISE: bool>(self, angle: u8) -> Self
fn n_right_angles<const CLOCKWISE: bool>(self, angle: u8) -> Self
self, as viewed from the face on which both are located.Source§fn beside_then_opposite(self) -> Self
fn beside_then_opposite(self) -> Self
CubeSurfacePoint::opposite_then_beside. Read moreSource§fn flip_1_and_3(self) -> Self
fn flip_1_and_3(self) -> Self
CubeSurfacePoint::opposite_then_beside. Read moreSource§fn flip_sign_of_1(self) -> Self::OtherGroup
fn flip_sign_of_1(self) -> Self::OtherGroup
CubeSurfacePoint::besideSource§fn flip_sign_of_3(self) -> Self::OtherGroup
fn flip_sign_of_3(self) -> Self::OtherGroup
CubeSurfacePoint::oppositeSource§fn flip_1_and_2(self) -> Self
fn flip_1_and_2(self) -> Self
Source§impl Ord for CubeSurfacePoint
impl Ord for CubeSurfacePoint
Source§fn cmp(&self, other: &CubeSurfacePoint) -> Ordering
fn cmp(&self, other: &CubeSurfacePoint) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for CubeSurfacePoint
impl PartialEq for CubeSurfacePoint
Source§impl PartialOrd for CubeSurfacePoint
impl PartialOrd for CubeSurfacePoint
Source§impl TryFrom<CubeSurfacePoint> for OppositeGroupPoint
Please refer to crate::CubeSurfacePoint::determine_group.
impl TryFrom<CubeSurfacePoint> for OppositeGroupPoint
Please refer to crate::CubeSurfacePoint::determine_group.
Source§type Error = ReferenceGroupPoint
type Error = ReferenceGroupPoint
If a certain CubeSurfacePoint does not belong to the OppositeGroupPoints, it must by necessity belong to the ReferenceGroupPoints.
Source§impl TryFrom<CubeSurfacePoint> for OppositeGroupPoint
Please refer to CubeSurfacePoint::determine_group.
impl TryFrom<CubeSurfacePoint> for OppositeGroupPoint
Please refer to CubeSurfacePoint::determine_group.
Source§type Error = ReferenceGroupPoint
type Error = ReferenceGroupPoint
If a certain CubeSurfacePoint does not belong to the OppositeGroupPoints, it must by necessity belong to the ReferenceGroupPoints.
Source§impl TryFrom<CubeSurfacePoint> for ReferenceGroupPoint
Please refer to crate::CubeSurfacePoint::determine_group.
impl TryFrom<CubeSurfacePoint> for ReferenceGroupPoint
Please refer to crate::CubeSurfacePoint::determine_group.
Source§type Error = OppositeGroupPoint
type Error = OppositeGroupPoint
If a certain CubeSurfacePoint does not belong to the ReferenceGroupPoints, it must by necessity belong to the OppositeGroupPoints.
Source§impl TryFrom<CubeSurfacePoint> for ReferenceGroupPoint
Please refer to CubeSurfacePoint::determine_group.
impl TryFrom<CubeSurfacePoint> for ReferenceGroupPoint
Please refer to CubeSurfacePoint::determine_group.
Source§type Error = OppositeGroupPoint
type Error = OppositeGroupPoint
If a certain CubeSurfacePoint does not belong to the ReferenceGroupPoints, it must by necessity belong to the OppositeGroupPoints.
Source§impl TryFrom<u8> for CubeSurfacePoint
Converts an u8 to a CubeSurfacePoint, if it is within limits.
impl TryFrom<u8> for CubeSurfacePoint
Converts an u8 to a CubeSurfacePoint, if it is within limits.
If it is not, the u8 is returned as-is.