pub enum ExtRotation {
Discrete {
angles: Vec<f32>,
},
Stepped {
step: f32,
},
Continuous {},
}Expand description
Explicit rotation modes, validated at import. Lists and stepped expansions are limited to 65,536 angles.
Variants§
Discrete
A nonempty list of finite angles in degrees. Zero is not implicit. Equivalent angles are normalized modulo 360 and deduplicated.
Stepped
Zero-based increments covering one turn, excluding the duplicate endpoint.
The finite step must be in (0, 360]. In f64 arithmetic, round 360 / step
to a count and require abs(count * step - 360) <= 360 * f32::EPSILON.
Expand by index as i * 360 / count, avoiding accumulated rounding error.
Continuous
Any rotation angle. No null or empty-list sentinel is used.
Trait Implementations§
Source§impl Clone for ExtRotation
impl Clone for ExtRotation
Source§fn clone(&self) -> ExtRotation
fn clone(&self) -> ExtRotation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ExtRotation
impl Debug for ExtRotation
Source§impl<'de> Deserialize<'de> for ExtRotation
impl<'de> Deserialize<'de> for ExtRotation
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 ExtRotation
impl PartialEq for ExtRotation
Source§fn eq(&self, other: &ExtRotation) -> bool
fn eq(&self, other: &ExtRotation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ExtRotation
impl Serialize for ExtRotation
impl StructuralPartialEq for ExtRotation
Auto Trait Implementations§
impl Freeze for ExtRotation
impl RefUnwindSafe for ExtRotation
impl Send for ExtRotation
impl Sync for ExtRotation
impl Unpin for ExtRotation
impl UnsafeUnpin for ExtRotation
impl UnwindSafe for ExtRotation
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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