Explorar o código

exercise 2.4: sin(theta) where theta is given in degrees

George C. Privon %!s(int64=2) %!d(string=hai) anos
pai
achega
b3924913bd
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      02-basicfunctions/exercises/ex2.4.hs

+ 7 - 0
02-basicfunctions/exercises/ex2.4.hs

@@ -0,0 +1,7 @@
+-- Exercise 2.4
+-- George C. Privon
+-- 2023-09-05
+
+-- Function that computes the sin(theta) where theta is in degrees
+sinDeg :: Double -> Double
+sinDeg x = sin $ x * pi / 180