Struct fyrox_core::math::SmoothAngle
source · [−]Fields
angle: f32
Current angle in radians.
target: f32
Target angle in radians.
speed: f32
Turn speed in radians per second (rad/s)
Implementations
sourceimpl SmoothAngle
impl SmoothAngle
pub fn set_target(&mut self, angle: f32) -> &mut Self
pub fn update(&mut self, dt: f32) -> &mut Self
pub fn set_speed(&mut self, speed: f32) -> &mut Self
pub fn set_angle(&mut self, angle: f32) -> &mut Self
pub fn angle(&self) -> f32
pub fn at_target(&self) -> bool
pub fn distance(&self) -> f32
Trait Implementations
sourceimpl Debug for SmoothAngle
impl Debug for SmoothAngle
sourceimpl Default for SmoothAngle
impl Default for SmoothAngle
sourceimpl PartialEq<SmoothAngle> for SmoothAngle
impl PartialEq<SmoothAngle> for SmoothAngle
sourcefn eq(&self, other: &SmoothAngle) -> bool
fn eq(&self, other: &SmoothAngle) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SmoothAngle) -> bool
fn ne(&self, other: &SmoothAngle) -> bool
This method tests for !=
.
sourceimpl Visit for SmoothAngle where
f32: Visit,
f32: Visit,
f32: Visit,
impl Visit for SmoothAngle where
f32: Visit,
f32: Visit,
f32: Visit,
fn visit(&mut self, name: &str, visitor: &mut Visitor) -> VisitResult
impl StructuralPartialEq for SmoothAngle
Auto Trait Implementations
impl RefUnwindSafe for SmoothAngle
impl Send for SmoothAngle
impl Sync for SmoothAngle
impl Unpin for SmoothAngle
impl UnwindSafe for SmoothAngle
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
sourceimpl<T> PropertyValue for T where
T: 'static + Debug,
impl<T> PropertyValue for T where
T: 'static + Debug,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.