Struct libreda_db::prelude::Rot90Transform
source · [−]pub struct Rot90Transform {
angle: Angle,
}
Expand description
Transformation that consists only of a rotation by a multiple of 90 degrees
around the origin (0, 0)
.
Fields
angle: Angle
Implementations
sourceimpl Rot90Transform
impl Rot90Transform
sourcepub fn new(angle: Angle) -> Rot90Transform
pub fn new(angle: Angle) -> Rot90Transform
Create a new rotation transformation.
sourcepub fn is_unitary(&self) -> bool
pub fn is_unitary(&self) -> bool
This transformation is always unitary. Returns always true
.
sourcepub fn transform_point<T>(&self, p: Point<T>) -> Point<T> where
T: CoordinateType,
pub fn transform_point<T>(&self, p: Point<T>) -> Point<T> where
T: CoordinateType,
Apply the transformation to a single point.
sourcepub fn magnification<T>(&self) -> T where
T: CoordinateType,
pub fn magnification<T>(&self) -> T where
T: CoordinateType,
Get the magnification of this transformation. Always 1
.
sourcepub fn try_magnification<T>(&self) -> Option<T> where
T: CoordinateType,
pub fn try_magnification<T>(&self) -> Option<T> where
T: CoordinateType,
Get the magnification of this transformation. Always Some(1)
.
Trait Implementations
sourceimpl Clone for Rot90Transform
impl Clone for Rot90Transform
sourcefn clone(&self) -> Rot90Transform
fn clone(&self) -> Rot90Transform
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Rot90Transform
impl Debug for Rot90Transform
sourceimpl<'de> Deserialize<'de> for Rot90Transform
impl<'de> Deserialize<'de> for Rot90Transform
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Rot90Transform, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Rot90Transform, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Hash for Rot90Transform
impl Hash for Rot90Transform
sourceimpl PartialEq<Rot90Transform> for Rot90Transform
impl PartialEq<Rot90Transform> for Rot90Transform
sourcefn eq(&self, other: &Rot90Transform) -> bool
fn eq(&self, other: &Rot90Transform) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Rot90Transform) -> bool
fn ne(&self, other: &Rot90Transform) -> bool
This method tests for !=
.
sourceimpl Serialize for Rot90Transform
impl Serialize for Rot90Transform
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Rot90Transform
Auto Trait Implementations
impl RefUnwindSafe for Rot90Transform
impl Send for Rot90Transform
impl Sync for Rot90Transform
impl Unpin for Rot90Transform
impl UnwindSafe for Rot90Transform
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more