Trait geod_types::Angle [−][src]
pub trait Angle: AngleNames + Ord + CheckedAdd + CheckedSub + FromStr<Err = Self::ParseErr> + TryFrom<f64, Error = Self::NumErr> { type NumErr: Error; type ParseErr: Error; fn obtuse_err() -> Self::NumErr; fn reflex_err() -> Self::NumErr; fn turn_err() -> Self::NumErr; fn complement(self) -> Option<Self> { ... } fn supplement(self) -> Option<Self> { ... } fn explement(self) -> Self { ... } fn abs_diff(self, rhs: Self) -> Self { ... } fn turn_eq(self, other: Self) -> bool { ... } fn and_not_obtuse(self) -> Result<Self, Self::NumErr> { ... } fn and_not_reflex(self) -> Result<Self, Self::NumErr> { ... } }
Angle with ordering, addition/subtraction operations and the abilities to construct itself from a string or a float number
Associated Types
type NumErr: Error
[src]
The error that can appear when representing some part of the angle with a number
type ParseErr: Error
[src]
The error that can appear while parsing the angle from a string
Required methods
fn obtuse_err() -> Self::NumErr
[src]
Produce an error variant indicating an angle is more than the right one
fn reflex_err() -> Self::NumErr
[src]
Produce an error variant indicating an angle is reflex
fn turn_err() -> Self::NumErr
[src]
Produce an error variant indicating an angle does not fall into full circle
Provided methods
fn complement(self) -> Option<Self>
[src]
Adjacent angle which sum to a right angle
fn supplement(self) -> Option<Self>
[src]
Adjacent angle which sum to a straight angle
fn explement(self) -> Self
[src]
Adjacent angle which sum to a complete angle
fn abs_diff(self, rhs: Self) -> Self
[src]
Difference between the angles by modulo independent of the order
fn turn_eq(self, other: Self) -> bool
[src]
Is the other
angle differs by an exact multiple of a full turn
fn and_not_obtuse(self) -> Result<Self, Self::NumErr>
[src]
Check the angle is less than or equal to the right one
Errors
When the angle is greater than 90 degrees
fn and_not_reflex(self) -> Result<Self, Self::NumErr>
[src]
Implementors
impl Angle for AccurateDegree
[src]
impl Angle for AccurateDegree
[src]impl Angle for DecimalDegree
[src]
impl Angle for DecimalDegree
[src]