Explorar el Código

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

George C. Privon hace 2 años
padre
commit
b3924913bd
Se han modificado 1 ficheros con 7 adiciones y 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