pub struct AnalogSticks {
pub right_x: u8,
pub right_y: u8,
pub left_x: u8,
pub left_y: u8,
}Expand description
Raw DualShock stick bytes from one poll.
Fields§
§right_x: u8Right stick horizontal axis.
right_y: u8Right stick vertical axis.
left_x: u8Left stick horizontal axis.
left_y: u8Left stick vertical axis.
Implementations§
Source§impl AnalogSticks
impl AnalogSticks
Sourcepub const fn left_centered(self) -> (i16, i16)
pub const fn left_centered(self) -> (i16, i16)
Left stick as signed deltas from centre.
Sourcepub const fn right_centered(self) -> (i16, i16)
pub const fn right_centered(self) -> (i16, i16)
Right stick as signed deltas from centre.
Trait Implementations§
Source§impl Clone for AnalogSticks
impl Clone for AnalogSticks
Source§fn clone(&self) -> AnalogSticks
fn clone(&self) -> AnalogSticks
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnalogSticks
impl Debug for AnalogSticks
Source§impl Default for AnalogSticks
impl Default for AnalogSticks
Source§impl PartialEq for AnalogSticks
impl PartialEq for AnalogSticks
impl Copy for AnalogSticks
impl Eq for AnalogSticks
impl StructuralPartialEq for AnalogSticks
Auto Trait Implementations§
impl Freeze for AnalogSticks
impl RefUnwindSafe for AnalogSticks
impl Send for AnalogSticks
impl Sync for AnalogSticks
impl Unpin for AnalogSticks
impl UnsafeUnpin for AnalogSticks
impl UnwindSafe for AnalogSticks
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)