pub struct GamepadAxis2DEvent {
pub index: usize,
pub value: Vec2<f64>,
}
Expand description
A 2D axis event on a gamepad.
Fields§
§index: usize
The 2D axes index (0 is the left stick, 1 is the right stick).
value: Vec2<f64>
The value of the axis (each component is between -1.0 and 1.0, modeled after the Web Gamepad API).
Implementations§
Trait Implementations§
Source§impl Clone for GamepadAxis2DEvent
impl Clone for GamepadAxis2DEvent
Source§fn clone(&self) -> GamepadAxis2DEvent
fn clone(&self) -> GamepadAxis2DEvent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GamepadAxis2DEvent
impl Debug for GamepadAxis2DEvent
Source§impl<'de> Deserialize<'de> for GamepadAxis2DEvent
impl<'de> Deserialize<'de> for GamepadAxis2DEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GamepadAxis2DEvent
impl PartialEq for GamepadAxis2DEvent
Source§impl Serialize for GamepadAxis2DEvent
impl Serialize for GamepadAxis2DEvent
impl StructuralPartialEq for GamepadAxis2DEvent
Auto Trait Implementations§
impl Freeze for GamepadAxis2DEvent
impl RefUnwindSafe for GamepadAxis2DEvent
impl Send for GamepadAxis2DEvent
impl Sync for GamepadAxis2DEvent
impl Unpin for GamepadAxis2DEvent
impl UnwindSafe for GamepadAxis2DEvent
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