pub struct DirectionalMode {
pub angle: u16,
pub delta: AngleDelta,
}Expand description
Directional mode with angle information.
Fields§
§angle: u16Base angle in degrees.
delta: AngleDeltaAngle delta (AV1 only, -3 to +3 steps of 3 degrees).
Implementations§
Source§impl DirectionalMode
impl DirectionalMode
Sourcepub const fn with_delta(angle: u16, delta: AngleDelta) -> Self
pub const fn with_delta(angle: u16, delta: AngleDelta) -> Self
Create a new directional mode with delta.
Sourcepub const fn effective_angle(self) -> i16
pub const fn effective_angle(self) -> i16
Get the effective angle including delta adjustment.
Sourcepub const fn is_vertical_ish(self) -> bool
pub const fn is_vertical_ish(self) -> bool
Check if this is a vertical-ish direction (45-135 degrees).
Sourcepub const fn is_horizontal_ish(self) -> bool
pub const fn is_horizontal_ish(self) -> bool
Check if this is a horizontal-ish direction (135-225 degrees).
Trait Implementations§
Source§impl Clone for DirectionalMode
impl Clone for DirectionalMode
Source§fn clone(&self) -> DirectionalMode
fn clone(&self) -> DirectionalMode
Returns a duplicate 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 DirectionalMode
impl Debug for DirectionalMode
Source§impl Default for DirectionalMode
impl Default for DirectionalMode
Source§impl PartialEq for DirectionalMode
impl PartialEq for DirectionalMode
impl Copy for DirectionalMode
impl Eq for DirectionalMode
impl StructuralPartialEq for DirectionalMode
Auto Trait Implementations§
impl Freeze for DirectionalMode
impl RefUnwindSafe for DirectionalMode
impl Send for DirectionalMode
impl Sync for DirectionalMode
impl Unpin for DirectionalMode
impl UnsafeUnpin for DirectionalMode
impl UnwindSafe for DirectionalMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more