pub struct Joystick {
pub x: f32,
pub y: f32,
}Expand description
Stores how far the joystick is away from the center (at (0, 0)) from -1 to 1. On the x axis left is negative, and right is positive. On the y axis down is negative, and up is positive.
Fields§
§x: f32Left and right x value of the joystick
y: f32Up and down y value of the joystick
Trait Implementations§
impl Copy for Joystick
impl StructuralPartialEq for Joystick
Auto Trait Implementations§
impl Freeze for Joystick
impl RefUnwindSafe for Joystick
impl Send for Joystick
impl Sync for Joystick
impl Unpin for Joystick
impl UnwindSafe for Joystick
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