pub struct Rad<S> {
pub s: S,
}
Expand description
An angle, in radians
Fields§
§s: S
Trait Implementations§
source§impl<S: BaseFloat> Angle<S> for Rad<S>
impl<S: BaseFloat> Angle<S> for Rad<S>
fn full_turn() -> Rad<S>
source§fn sub_a(&self, other: Self) -> Self
fn sub_a(&self, other: Self) -> Self
Subtract another angle from this one, returning the new angle.
source§fn rem_s(&self, s: S) -> Self
fn rem_s(&self, s: S) -> Self
Take the remainder of this angle by a scalar, returning the new angle.
source§fn add_self_a(&mut self, other: Self)
fn add_self_a(&mut self, other: Self)
Add this angle with another, in-place.
source§fn sub_self_a(&mut self, other: Self)
fn sub_self_a(&mut self, other: Self)
Subtract another angle from this one, in-place.
source§fn mul_self_s(&mut self, s: S)
fn mul_self_s(&mut self, s: S)
Multiply this angle by a scalar, in-place.
source§fn div_self_s(&mut self, s: S)
fn div_self_s(&mut self, s: S)
Divide this angle by a scalar, in-place.
source§fn rem_self_s(&mut self, s: S)
fn rem_self_s(&mut self, s: S)
Take the remainder of this angle by a scalar, in-place.
source§fn normalize_self(&mut self)
fn normalize_self(&mut self)
Normalize the angle to the range
[0, full_turn)
.fn turn_div_2() -> Self
fn turn_div_3() -> Self
fn turn_div_4() -> Self
fn turn_div_6() -> Self
fn equiv(&self, other: &Self) -> bool
source§impl<S: PartialEq> PartialEq<Rad<S>> for Rad<S>
impl<S: PartialEq> PartialEq<Rad<S>> for Rad<S>
source§impl<S: PartialOrd> PartialOrd<Rad<S>> for Rad<S>
impl<S: PartialOrd> PartialOrd<Rad<S>> for Rad<S>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<S: BaseFloat + PartialOrd + SampleRange + Rand> Rand for Rad<S>
impl<S: BaseFloat + PartialOrd + SampleRange + Rand> Rand for Rad<S>
impl<S: Copy> Copy for Rad<S>
impl<S> StructuralPartialEq for Rad<S>
Auto Trait Implementations§
impl<S> RefUnwindSafe for Rad<S>where S: RefUnwindSafe,
impl<S> Send for Rad<S>where S: Send,
impl<S> Sync for Rad<S>where S: Sync,
impl<S> Unpin for Rad<S>where S: Unpin,
impl<S> UnwindSafe for Rad<S>where S: 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