pub struct State {
pub position: f32,
pub velocity: f32,
pub acceleration: f32,
}Fields§
§position: f32§velocity: f32§acceleration: f32Implementations§
source§impl State
impl State
pub fn new(position: f32, velocity: f32, acceleration: f32) -> State
pub fn update(&mut self, delta_time: f32)
pub fn set_constant_acceleration(&mut self, acceleration: f32)
pub fn set_constant_velocity(&mut self, velocity: f32)
pub fn set_constant_position(&mut self, position: f32)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more