Struct angulus::prelude::AngleUnbounded
source · #[repr(transparent)]pub struct AngleUnbounded<F> { /* private fields */ }Expand description
Represents a point on the circle as an 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 different
angles :
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.
Trait Implementations§
source§impl<F: Float> Add<&AngleUnbounded<F>> for &AngleUnbounded<F>
impl<F: Float> Add<&AngleUnbounded<F>> for &AngleUnbounded<F>
§type Output = <AngleUnbounded<F> as Add<AngleUnbounded<F>>>::Output
type Output = <AngleUnbounded<F> as Add<AngleUnbounded<F>>>::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>
§type Output = <AngleUnbounded<F> as Add<AngleUnbounded<F>>>::Output
type Output = <AngleUnbounded<F> as Add<AngleUnbounded<F>>>::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>
§type Output = <AngleUnbounded<F> as Add<AngleUnbounded<F>>>::Output
type Output = <AngleUnbounded<F> as Add<AngleUnbounded<F>>>::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§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<AngleUnbounded<F>> for AngleUnbounded<F>
impl<F: Float> AddAssign<AngleUnbounded<F>> 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>
impl<'de, F: Float + Deserialize<'de>> Deserialize<'de> for AngleUnbounded<F>
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>>,
impl<F: Float> Distribution<AngleUnbounded<F>> for Standardwhere Self: Distribution<Angle<F>>,
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§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<AngleUnbounded<F>> for AngleUnbounded<F>
impl<F: PartialEq> PartialEq<AngleUnbounded<F>> for AngleUnbounded<F>
source§fn eq(&self, other: &AngleUnbounded<F>) -> bool
fn eq(&self, other: &AngleUnbounded<F>) -> bool
self and other values to be equal, and is used
by ==.source§impl<F: PartialOrd> PartialOrd<AngleUnbounded<F>> for AngleUnbounded<F>
impl<F: PartialOrd> PartialOrd<AngleUnbounded<F>> for AngleUnbounded<F>
source§fn partial_cmp(&self, other: &AngleUnbounded<F>) -> Option<Ordering>
fn partial_cmp(&self, other: &AngleUnbounded<F>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl<F> SampleUniform for AngleUnbounded<F>where
UniformFloat<F>: UniformSampler<X = F>,
F: SampleBorrow<F> + Copy,
impl<F> SampleUniform for AngleUnbounded<F>where UniformFloat<F>: UniformSampler<X = F>, F: SampleBorrow<F> + Copy,
§type Sampler = UniformAngleUnbounded<F>
type Sampler = UniformAngleUnbounded<F>
UniformSampler implementation supporting type X.source§impl<F: Float> Sub<&AngleUnbounded<F>> for &AngleUnbounded<F>
impl<F: Float> Sub<&AngleUnbounded<F>> for &AngleUnbounded<F>
§type Output = <AngleUnbounded<F> as Sub<AngleUnbounded<F>>>::Output
type Output = <AngleUnbounded<F> as Sub<AngleUnbounded<F>>>::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>
§type Output = <AngleUnbounded<F> as Sub<AngleUnbounded<F>>>::Output
type Output = <AngleUnbounded<F> as Sub<AngleUnbounded<F>>>::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>
§type Output = <AngleUnbounded<F> as Sub<AngleUnbounded<F>>>::Output
type Output = <AngleUnbounded<F> as Sub<AngleUnbounded<F>>>::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§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<AngleUnbounded<F>> for AngleUnbounded<F>
impl<F: Float> SubAssign<AngleUnbounded<F>> 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<AngleUnbounded<F>> for AngleUnbounded<F>
impl<F: Sum> Sum<AngleUnbounded<F>> for AngleUnbounded<F>
impl<F: Copy> Copy for AngleUnbounded<F>
impl<F: Eq> Eq for AngleUnbounded<F>
impl<F> StructuralEq for AngleUnbounded<F>
impl<F> StructuralPartialEq for AngleUnbounded<F>
Auto Trait Implementations§
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<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