Enum gilrs::ev::Axis [−][src]
#[repr(u16)]
pub enum Axis {
LeftStickX,
LeftStickY,
LeftZ,
RightStickX,
RightStickY,
RightZ,
DPadX,
DPadY,
Unknown,
}
Expand description
Gamepad’s elements which state can be represented by value from -1.0 to 1.0.
Variants
LeftStickX
LeftStickY
LeftZ
RightStickX
RightStickY
RightZ
DPadX
DPadY
Unknown
Implementations
Returns true if axis is LeftStickX
, LeftStickY
, RightStickX
or RightStickY
.
Returns the other axis from same element of gamepad, if any.
input | output |
---|---|
LeftStickX | Some(LeftStickY) |
LeftStickY | Some(LeftStickX) |
RightStickX | Some(RightStickY) |
RightStickY | Some(RightStickX) |
DpadX | Some(DpadY) |
DpadY | Some(DpadX) |
… | None |
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for Axis
impl UnwindSafe for Axis
Blanket Implementations
Mutably borrows from an owned value. Read more