summaryrefslogtreecommitdiff
path: root/src/geom/angle.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/geom/angle.rs')
-rw-r--r--src/geom/angle.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/geom/angle.rs b/src/geom/angle.rs
index ef3276e8..4e08a518 100644
--- a/src/geom/angle.rs
+++ b/src/geom/angle.rs
@@ -40,6 +40,16 @@ impl Angle {
(self.0).0
}
+ /// Get the sine of this angle.
+ pub fn sin(self) -> f64 {
+ self.to_rad().sin()
+ }
+
+ /// Get the cosine of this angle.
+ pub fn cos(self) -> f64 {
+ self.to_rad().cos()
+ }
+
/// Create an angle from a value in a unit.
pub fn with_unit(val: f64, unit: AngularUnit) -> Self {
Self(Scalar(val * unit.raw_scale()))