Enum Angle
Source pub enum Angle<T = f64> {
Radians(T),
Degrees(T),
}
Expand description
An angle.
Might be a value in degrees or in radians.
Yield the value encoded in radians.
Yield the value encoded in degrees.
An angle of 90° (right angle).
An angle of 180° (straight).
An angle of 360° (perigon).
Create a new angle by normalizing the value into the range of
[0, 2π) rad.
Computes the minimal unsigned distance between two normalized angles. Returns an
angle in the range of [0, π] rad.
let distance = Degrees(345.0).min_dist(Degrees(15.0));
assert!((distance.in_degrees() - 30.0) < 1.0e-10);
Compute the absolute angle.
Compute the sine of the angle.
Compute the cosine of the angle.
Compute the tangent of the angle.
Simultaneously compute the sine and cosine of the number, x
.
Return (sin(x), cos(x))
.
The resulting type after applying the +
operator.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Formats the value using the given formatter.
Read more
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the -
operator.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
The resulting type after applying the -
operator.
Returns the additive identity element of
Self
,
0
.
Read more
Returns true
if self
is equal to the additive identity.
Sets self
to the additive identity element of Self
, 0
.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
🔬This is a nightly-only experimental API. (clone_to_uninit
)
Performs copy-assignment from
self
to
dest
.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
Converts the given value to a
String
.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.