pub struct AngleUnbounded<F> { /* private fields */ }Expand description
Represents a point on the circle as a unit-agnostic angle.
The parameter F is the floating-point type used to store the value.
§Behaviour
Unlike Angle, two different values of the same point on the circle are
two different AngleUnbounded.
let a = AngleUnbounded::from_degrees(90.0);
let b = AngleUnbounded::from_degrees(450.0);
assert_ne!(a, b);Implementations§
Source§impl<F: Float> AngleUnbounded<F>
impl<F: Float> AngleUnbounded<F>
Sourcepub const EPSILON: Self
pub const EPSILON: Self
Machine epsilon value for AngleUnbounded.
Source§impl<F: Float> AngleUnbounded<F>
impl<F: Float> AngleUnbounded<F>
Sourcepub const RAD_FRAC_PI_2: Self
pub const RAD_FRAC_PI_2: Self
The angle of π/2 radians.
Sourcepub const RAD_FRAC_PI_3: Self
pub const RAD_FRAC_PI_3: Self
The angle of π/3 radians.
Sourcepub const RAD_FRAC_PI_4: Self
pub const RAD_FRAC_PI_4: Self
The angle of π/4 radians.
Sourcepub const RAD_FRAC_PI_6: Self
pub const RAD_FRAC_PI_6: Self
The angle of π/6 radians.
Sourcepub const RAD_FRAC_PI_8: Self
pub const RAD_FRAC_PI_8: Self
The angle of π/8 radians.
Source§impl<F: Float> AngleUnbounded<F>
impl<F: Float> AngleUnbounded<F>
Source§impl<F: Float> AngleUnbounded<F>
impl<F: Float> AngleUnbounded<F>
Source§impl<F: Float> AngleUnbounded<F>
impl<F: Float> AngleUnbounded<F>
Source§impl<F> AngleUnbounded<F>
impl<F> AngleUnbounded<F>
Sourcepub const fn from_radians(radians: F) -> Self
pub const fn from_radians(radians: F) -> Self
Creates a new unbounded angle from a value in radians.
Source§impl<F: Float> AngleUnbounded<F>
impl<F: Float> AngleUnbounded<F>
Sourcepub fn from_degrees(degrees: F) -> Self
pub fn from_degrees(degrees: F) -> Self
Creates a new unbounded angle from a value in degrees.
Sourcepub fn from_turns(turns: F) -> Self
pub fn from_turns(turns: F) -> Self
Creates a new unbounded angle from a value in turns.
Sourcepub fn from_gradians(gradians: F) -> Self
pub fn from_gradians(gradians: F) -> Self
Creates a new unbounded angle from a value in gradians.
Source§impl<F: Copy> AngleUnbounded<F>
impl<F: Copy> AngleUnbounded<F>
Sourcepub const fn to_radians(self) -> F
pub const fn to_radians(self) -> F
The value of the unbounded angle in radians.
Source§impl<F: Float> AngleUnbounded<F>
impl<F: Float> AngleUnbounded<F>
Sourcepub fn to_degrees(self) -> F
pub fn to_degrees(self) -> F
The value of the unbounded angle in degrees.
Sourcepub fn to_gradians(self) -> F
pub fn to_gradians(self) -> F
The value of the unbounded angle in gradians.
Source§impl<F: Float> AngleUnbounded<F>
impl<F: Float> AngleUnbounded<F>
Sourcepub fn to_bounded(self) -> Angle<F>
pub fn to_bounded(self) -> Angle<F>
Converts this angle into a bounded angle.
Source§impl AngleUnbounded<f32>
impl AngleUnbounded<f32>
Sourcepub fn to_f64(self) -> AngleUnbounded<f64>
pub fn to_f64(self) -> AngleUnbounded<f64>
Converts the floating point type to f64.
Source§impl AngleUnbounded<f64>
impl AngleUnbounded<f64>
Sourcepub fn to_f32(self) -> AngleUnbounded<f32>
pub fn to_f32(self) -> AngleUnbounded<f32>
Converts the floating point type to f32.
Source§impl<F: FloatMath> AngleUnbounded<F>
impl<F: FloatMath> AngleUnbounded<F>
Trait Implementations§
Source§impl<F: Float> Add<&AngleUnbounded<F>> for &AngleUnbounded<F>
impl<F: Float> Add<&AngleUnbounded<F>> for &AngleUnbounded<F>
Source§type Output = <AngleUnbounded<F> as Add>::Output
type Output = <AngleUnbounded<F> as Add>::Output
+ operator.Source§fn add(
self,
other: &AngleUnbounded<F>,
) -> <AngleUnbounded<F> as Add<AngleUnbounded<F>>>::Output
fn add( self, other: &AngleUnbounded<F>, ) -> <AngleUnbounded<F> as Add<AngleUnbounded<F>>>::Output
+ operation. Read moreSource§impl<F: Float> Add<&AngleUnbounded<F>> for AngleUnbounded<F>
impl<F: Float> Add<&AngleUnbounded<F>> for AngleUnbounded<F>
Source§type Output = <AngleUnbounded<F> as Add>::Output
type Output = <AngleUnbounded<F> as Add>::Output
+ operator.Source§fn add(
self,
other: &AngleUnbounded<F>,
) -> <AngleUnbounded<F> as Add<AngleUnbounded<F>>>::Output
fn add( self, other: &AngleUnbounded<F>, ) -> <AngleUnbounded<F> as Add<AngleUnbounded<F>>>::Output
+ operation. Read moreSource§impl<'a, F: Float> Add<AngleUnbounded<F>> for &'a AngleUnbounded<F>
impl<'a, F: Float> Add<AngleUnbounded<F>> for &'a AngleUnbounded<F>
Source§type Output = <AngleUnbounded<F> as Add>::Output
type Output = <AngleUnbounded<F> as Add>::Output
+ operator.Source§fn add(
self,
other: AngleUnbounded<F>,
) -> <AngleUnbounded<F> as Add<AngleUnbounded<F>>>::Output
fn add( self, other: AngleUnbounded<F>, ) -> <AngleUnbounded<F> as Add<AngleUnbounded<F>>>::Output
+ operation. Read moreSource§impl<F: Float> Add for AngleUnbounded<F>
impl<F: Float> Add for AngleUnbounded<F>
Source§impl<F: Float> AddAssign<&AngleUnbounded<F>> for AngleUnbounded<F>
impl<F: Float> AddAssign<&AngleUnbounded<F>> for AngleUnbounded<F>
Source§fn add_assign(&mut self, other: &AngleUnbounded<F>)
fn add_assign(&mut self, other: &AngleUnbounded<F>)
+= operation. Read moreSource§impl<F: Float> AddAssign for AngleUnbounded<F>
impl<F: Float> AddAssign for AngleUnbounded<F>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+= operation. Read moreSource§impl<F: Clone> Clone for AngleUnbounded<F>
impl<F: Clone> Clone for AngleUnbounded<F>
Source§fn clone(&self) -> AngleUnbounded<F>
fn clone(&self) -> AngleUnbounded<F>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<F: Debug> Debug for AngleUnbounded<F>
impl<F: Debug> Debug for AngleUnbounded<F>
Source§impl<F: Float> Default for AngleUnbounded<F>
impl<F: Float> Default for AngleUnbounded<F>
Source§impl<'de, F: Float + Deserialize<'de>> Deserialize<'de> for AngleUnbounded<F>
Available on crate feature serde only.
impl<'de, F: Float + Deserialize<'de>> Deserialize<'de> for AngleUnbounded<F>
serde only.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>,
Source§impl<F: Float> Distribution<AngleUnbounded<F>> for Standardwhere
Self: Distribution<Angle<F>>,
Available on crate feature rand only.
impl<F: Float> Distribution<AngleUnbounded<F>> for Standardwhere
Self: Distribution<Angle<F>>,
rand only.Source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> AngleUnbounded<F>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> AngleUnbounded<F>
T, using rng as the source of randomness.Source§fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
T, using rng as
the source of randomness. Read moreSource§impl<'a, F: Float> Div<F> for &'a AngleUnbounded<F>
impl<'a, F: Float> Div<F> for &'a AngleUnbounded<F>
Source§impl<F: Float> Div<F> for AngleUnbounded<F>
impl<F: Float> Div<F> for AngleUnbounded<F>
Source§impl<F: Float> DivAssign<&F> for AngleUnbounded<F>
impl<F: Float> DivAssign<&F> for AngleUnbounded<F>
Source§fn div_assign(&mut self, other: &F)
fn div_assign(&mut self, other: &F)
/= operation. Read moreSource§impl<F: Float> DivAssign<F> for AngleUnbounded<F>
impl<F: Float> DivAssign<F> for AngleUnbounded<F>
Source§fn div_assign(&mut self, rhs: F)
fn div_assign(&mut self, rhs: F)
/= operation. Read moreSource§impl<F: Float> From<AngleUnbounded<F>> for Angle<F>
impl<F: Float> From<AngleUnbounded<F>> for Angle<F>
Source§fn from(angle: AngleUnbounded<F>) -> Self
fn from(angle: AngleUnbounded<F>) -> Self
Source§impl From<AngleUnbounded<f32>> for AngleUnbounded<f64>
impl From<AngleUnbounded<f32>> for AngleUnbounded<f64>
Source§fn from(value: AngleUnbounded<f32>) -> Self
fn from(value: AngleUnbounded<f32>) -> Self
Source§impl From<AngleUnbounded<f64>> for AngleUnbounded<f32>
impl From<AngleUnbounded<f64>> for AngleUnbounded<f32>
Source§fn from(value: AngleUnbounded<f64>) -> Self
fn from(value: AngleUnbounded<f64>) -> Self
Source§impl<F: Hash> Hash for AngleUnbounded<F>
impl<F: Hash> Hash for AngleUnbounded<F>
Source§impl<'a, F: Float> Mul<F> for &'a AngleUnbounded<F>
impl<'a, F: Float> Mul<F> for &'a AngleUnbounded<F>
Source§impl<F: Float> Mul<F> for AngleUnbounded<F>
impl<F: Float> Mul<F> for AngleUnbounded<F>
Source§impl<F: Float> MulAssign<&F> for AngleUnbounded<F>
impl<F: Float> MulAssign<&F> for AngleUnbounded<F>
Source§fn mul_assign(&mut self, other: &F)
fn mul_assign(&mut self, other: &F)
*= operation. Read moreSource§impl<F: Float> MulAssign<F> for AngleUnbounded<F>
impl<F: Float> MulAssign<F> for AngleUnbounded<F>
Source§fn mul_assign(&mut self, rhs: F)
fn mul_assign(&mut self, rhs: F)
*= operation. Read moreSource§impl<F: Float> Neg for &AngleUnbounded<F>
impl<F: Float> Neg for &AngleUnbounded<F>
Source§impl<F: Float> Neg for AngleUnbounded<F>
impl<F: Float> Neg for AngleUnbounded<F>
Source§impl<F: PartialEq> PartialEq for AngleUnbounded<F>
impl<F: PartialEq> PartialEq for AngleUnbounded<F>
Source§impl<F: PartialOrd> PartialOrd for AngleUnbounded<F>
impl<F: PartialOrd> PartialOrd for AngleUnbounded<F>
Source§impl<F> SampleUniform for AngleUnbounded<F>
Available on crate feature rand only.
impl<F> SampleUniform for AngleUnbounded<F>
rand only.Source§type Sampler = UniformAngleUnbounded<F>
type Sampler = UniformAngleUnbounded<F>
UniformSampler implementation supporting type X.Source§impl<F: Copy + Serialize> Serialize for AngleUnbounded<F>
Available on crate feature serde only.
impl<F: Copy + Serialize> Serialize for AngleUnbounded<F>
serde only.Source§impl<F: Float> Sub<&AngleUnbounded<F>> for &AngleUnbounded<F>
impl<F: Float> Sub<&AngleUnbounded<F>> for &AngleUnbounded<F>
Source§type Output = <AngleUnbounded<F> as Sub>::Output
type Output = <AngleUnbounded<F> as Sub>::Output
- operator.Source§fn sub(
self,
other: &AngleUnbounded<F>,
) -> <AngleUnbounded<F> as Sub<AngleUnbounded<F>>>::Output
fn sub( self, other: &AngleUnbounded<F>, ) -> <AngleUnbounded<F> as Sub<AngleUnbounded<F>>>::Output
- operation. Read moreSource§impl<F: Float> Sub<&AngleUnbounded<F>> for AngleUnbounded<F>
impl<F: Float> Sub<&AngleUnbounded<F>> for AngleUnbounded<F>
Source§type Output = <AngleUnbounded<F> as Sub>::Output
type Output = <AngleUnbounded<F> as Sub>::Output
- operator.Source§fn sub(
self,
other: &AngleUnbounded<F>,
) -> <AngleUnbounded<F> as Sub<AngleUnbounded<F>>>::Output
fn sub( self, other: &AngleUnbounded<F>, ) -> <AngleUnbounded<F> as Sub<AngleUnbounded<F>>>::Output
- operation. Read moreSource§impl<'a, F: Float> Sub<AngleUnbounded<F>> for &'a AngleUnbounded<F>
impl<'a, F: Float> Sub<AngleUnbounded<F>> for &'a AngleUnbounded<F>
Source§type Output = <AngleUnbounded<F> as Sub>::Output
type Output = <AngleUnbounded<F> as Sub>::Output
- operator.Source§fn sub(
self,
other: AngleUnbounded<F>,
) -> <AngleUnbounded<F> as Sub<AngleUnbounded<F>>>::Output
fn sub( self, other: AngleUnbounded<F>, ) -> <AngleUnbounded<F> as Sub<AngleUnbounded<F>>>::Output
- operation. Read moreSource§impl<F: Float> Sub for AngleUnbounded<F>
impl<F: Float> Sub for AngleUnbounded<F>
Source§impl<F: Float> SubAssign<&AngleUnbounded<F>> for AngleUnbounded<F>
impl<F: Float> SubAssign<&AngleUnbounded<F>> for AngleUnbounded<F>
Source§fn sub_assign(&mut self, other: &AngleUnbounded<F>)
fn sub_assign(&mut self, other: &AngleUnbounded<F>)
-= operation. Read moreSource§impl<F: Float> SubAssign for AngleUnbounded<F>
impl<F: Float> SubAssign for AngleUnbounded<F>
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-= operation. Read moreSource§impl<F: Sum> Sum for AngleUnbounded<F>
impl<F: Sum> Sum for AngleUnbounded<F>
impl<F: Copy> Copy for AngleUnbounded<F>
impl<F: Eq> Eq for AngleUnbounded<F>
impl<F> StructuralPartialEq for AngleUnbounded<F>
Auto Trait Implementations§
impl<F> Freeze for AngleUnbounded<F>where
F: Freeze,
impl<F> RefUnwindSafe for AngleUnbounded<F>where
F: RefUnwindSafe,
impl<F> Send for AngleUnbounded<F>where
F: Send,
impl<F> Sync for AngleUnbounded<F>where
F: Sync,
impl<F> Unpin for AngleUnbounded<F>where
F: Unpin,
impl<F> UnwindSafe for AngleUnbounded<F>where
F: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Borrowed> SampleBorrow<Borrowed> for Borrowedwhere
Borrowed: SampleUniform,
impl<Borrowed> SampleBorrow<Borrowed> for Borrowedwhere
Borrowed: SampleUniform,
Source§fn borrow(&self) -> &Borrowed
fn borrow(&self) -> &Borrowed
Borrow::borrow