Struct bevy_retrograde_epaint::Rot2 [−]
pub struct Rot2 { /* fields omitted */ }
Expand description
Represents a rotation in the 2D plane.
A rotation of π/4 = 90Β° rotates the X axis to the Y axis.
Normally a Rot2
is normalized (unit-length).
If not, it will also scale vectors.
Implementations
impl Rot2
impl Rot2
Use Rot2::IDENTITY
pub fn from_angle(angle: f32) -> Rot2
pub fn from_angle(angle: f32) -> Rot2
A π/4 = 90Β° rotation means rotating the X axis to the Y axis.
pub fn length_squared(self) -> f32
pub fn normalized(self) -> Rot2
Trait Implementations
Scales the rotor.
Rotates (and maybe scales) the vector.
Scales the rotor.
impl StructuralPartialEq for Rot2
Auto Trait Implementations
impl RefUnwindSafe for Rot2
impl UnwindSafe for Rot2
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
βs vtable from &Trait
βs. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
βs vtable from &mut Trait
βs. Read more
impl<T> FromWorld for T where
T: Default,
impl<T> FromWorld for T where
T: Default,
pub fn from_world(_world: &mut World) -> T
pub fn from_world(_world: &mut World) -> T
Creates Self
using data from the given [World]
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
pub fn vzip(self) -> V