Browse Source

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

George C. Privon 2 năm trước cách đây
mục cha
commit
b3924913bd
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  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