From 09e25a8a218690157ba46ca5f7ccd5f33eab1c07 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Thu, 12 Sep 2024 15:30:36 +0200 Subject: [PATCH] Add Asin and Atan --- Angle.cpp | 10 +++++++++- Angle.h | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Angle.cpp b/Angle.cpp index 676a7e8..ebc689d 100644 --- a/Angle.cpp +++ b/Angle.cpp @@ -213,9 +213,17 @@ float AngleOf::Tan(AngleOf a) { } template -AngleOf Passer::LinearAlgebra::AngleOf::Acos(float f) { +AngleOf AngleOf::Acos(float f) { return AngleOf::Radians(acosf(f)); } +template +AngleOf AngleOf::Asin(float f) { + return AngleOf::Radians(asinf(f)); +} +template +AngleOf AngleOf::Atan(float f) { + return AngleOf::Radians(atanf(f)); +} template <> AngleOf AngleOf::CosineRuleSide(float a, diff --git a/Angle.h b/Angle.h index c4561e5..7befc46 100644 --- a/Angle.h +++ b/Angle.h @@ -64,6 +64,8 @@ class AngleOf { static float Tan(AngleOf a); static AngleOf Acos(float f); + static AngleOf Asin(float f); + static AngleOf Atan(float f); static AngleOf CosineRuleSide(float a, float b, AngleOf gamma); static AngleOf CosineRuleAngle(float a, float b, float c);