pub struct JoystickEvent {
pub direction: JoystickDirection,
pub intensity: f32,
pub angle: f32,
}Expand description
the event of the Joystick
call Joystick::update to get the current event
Fields§
§direction: JoystickDirectionthe direction to which the knob was moved
intensity: f32the intensity of the knob move, from 0 (center) to 1 (edge)
angle: f32the angle of the knob (in radians)
starting on the positive x-axis and rotating counter-clockwise
Trait Implementations§
Source§impl Clone for JoystickEvent
impl Clone for JoystickEvent
Source§fn clone(&self) -> JoystickEvent
fn clone(&self) -> JoystickEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for JoystickEvent
Source§impl Debug for JoystickEvent
impl Debug for JoystickEvent
Auto Trait Implementations§
impl Freeze for JoystickEvent
impl RefUnwindSafe for JoystickEvent
impl Send for JoystickEvent
impl Sync for JoystickEvent
impl Unpin for JoystickEvent
impl UnsafeUnpin for JoystickEvent
impl UnwindSafe for JoystickEvent
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