Enum ggez::event::Axis [−][src]
#[repr(u16)] pub enum Axis { LeftStickX, LeftStickY, LeftZ, RightStickX, RightStickY, RightZ, DPadX, DPadY, Unknown, }
Expand description
An analog axis of some device (gamepad thumbstick, joystick…). Gamepad’s elements which state can be represented by value from -1.0 to 1.0.
Variants
Implementations
An analog axis of some device (gamepad thumbstick, joystick…).
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
Auto Trait Implementations
impl RefUnwindSafe for Axis
impl UnwindSafe for Axis
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V