summaryrefslogtreecommitdiff
path: root/src/geom/angle.rs
diff options
context:
space:
mode:
authorMartin Haug <mhaug@live.de>2022-03-16 12:36:50 +0100
committerMartin Haug <mhaug@live.de>2022-03-16 12:36:50 +0100
commit4d617bcd67f9e42218da190dc9a0bf2f10d4b78d (patch)
treefea275e9321004c15ed7d1def9f3749641f648ed /src/geom/angle.rs
parent288a926feae1e73dff5a6b103aa920d6f7eb0f35 (diff)
`LineNode`
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()))