From 5410a1f7eeff02b9b3cc6f6a678f2cc99279bd63 Mon Sep 17 00:00:00 2001 From: fdai7848 Date: Fri, 9 Feb 2024 21:59:17 +0100 Subject: [PATCH] add asin function --- src/reihen.c | 10 ++++++++++ src/reihen.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/reihen.c b/src/reihen.c index d194950..a0b09e8 100644 --- a/src/reihen.c +++ b/src/reihen.c @@ -94,4 +94,14 @@ double atanD(double degrees){ } return sum; +} + +double asinD(double degrees){ + if (degrees>=360.0){ + degrees = squashDegreesTo360(degrees); + } + + double sum = 0.0; + double radian = radians(degrees); + return atanD(radian/powerD(0.5,1-powerD(2,degrees))); } \ No newline at end of file diff --git a/src/reihen.h b/src/reihen.h index cb15a78..8b50925 100644 --- a/src/reihen.h +++ b/src/reihen.h @@ -7,5 +7,7 @@ double pi(); double radians(double degrees); double sinD(double degrees); double cosD(double degrees); +double atanD(double degrees); +double asinD(double degrees); #endif // reihen.h \ No newline at end of file