#[repr(transparent)]pub struct Gon<T>(pub T);
Expand description
An angular quantity measured in gons.
Gons, or gradians, are uniquely defined from 0..400.
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<T: Float + AbsDiffEq> AbsDiffEq for Gon<T>
impl<T: Float + AbsDiffEq> AbsDiffEq for Gon<T>
Source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
Source§fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
A test for equality that uses the absolute difference to compute the approximate
equality of two numbers.
Source§impl<U, T> AddAssign<U> for Gon<T>
impl<U, T> AddAssign<U> for Gon<T>
Source§fn add_assign(&mut self, rhs: U)
fn add_assign(&mut self, rhs: U)
Performs the
+=
operation. Read moreSource§impl<T: Float> Angle for Gon<T>
impl<T: Float> Angle for Gon<T>
Source§fn set_scalar(&mut self, value: T)
fn set_scalar(&mut self, value: T)
Set the internal scalar value of the angle.
Source§fn is_normalized(&self) -> bool
fn is_normalized(&self) -> bool
Whether the angle is in the standard domain.
Source§fn normalize(self) -> Gon<T>
fn normalize(self) -> Gon<T>
Normalize the angle, wrapping it back into the standard domain. Read more
Source§fn atan2(y: T, x: T) -> Gon<T>
fn atan2(y: T, x: T) -> Gon<T>
Compute the arctangent of a value, using information from
the numerator and denominator in order to increase the domain.
Source§fn quarter_turn() -> Self
fn quarter_turn() -> Self
Return one quarter of a full rotation in some unit.
Source§impl<T: DivAssign<T>> DivAssign<T> for Gon<T>
impl<T: DivAssign<T>> DivAssign<T> for Gon<T>
Source§fn div_assign(&mut self, rhs: T)
fn div_assign(&mut self, rhs: T)
Performs the
/=
operation. Read moreSource§impl<T, U> FromAngle<U> for Gon<T>
impl<T, U> FromAngle<U> for Gon<T>
Source§fn from_angle(from: U) -> Gon<T>
fn from_angle(from: U) -> Gon<T>
Construct
Self
by converting a T
.Source§impl<T: Float> Interpolate for Gon<T>
impl<T: Float> Interpolate for Gon<T>
Source§impl<T: MulAssign<T>> MulAssign<T> for Gon<T>
impl<T: MulAssign<T>> MulAssign<T> for Gon<T>
Source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the
*=
operation. Read moreSource§impl<T: PartialOrd> PartialOrd for Gon<T>
impl<T: PartialOrd> PartialOrd for Gon<T>
Source§impl<T: Float + RelativeEq> RelativeEq for Gon<T>
impl<T: Float + RelativeEq> RelativeEq for Gon<T>
Source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
Source§impl<T: RemAssign> RemAssign for Gon<T>
impl<T: RemAssign> RemAssign for Gon<T>
Source§fn rem_assign(&mut self, rhs: Gon<T>)
fn rem_assign(&mut self, rhs: Gon<T>)
Performs the
%=
operation. Read moreSource§impl<U, T> SubAssign<U> for Gon<T>
impl<U, T> SubAssign<U> for Gon<T>
Source§fn sub_assign(&mut self, rhs: U)
fn sub_assign(&mut self, rhs: U)
Performs the
-=
operation. Read moreSource§impl<T: Float + UlpsEq> UlpsEq for Gon<T>
impl<T: Float + UlpsEq> UlpsEq for Gon<T>
impl<T: Copy> Copy for Gon<T>
impl<T> StructuralPartialEq for Gon<T>
Auto Trait Implementations§
impl<T> Freeze for Gon<T>where
T: Freeze,
impl<T> RefUnwindSafe for Gon<T>where
T: RefUnwindSafe,
impl<T> Send for Gon<T>where
T: Send,
impl<T> Sync for Gon<T>where
T: Sync,
impl<T> Unpin for Gon<T>where
T: Unpin,
impl<T> UnwindSafe for Gon<T>where
T: UnwindSafe,
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, U> IntoAngle<U> for T
impl<T, U> IntoAngle<U> for T
type OutputScalar = <T as Angle>::Scalar
Source§fn into_angle(self) -> U
fn into_angle(self) -> U
Construct an angle from
self
.