瀏覽代碼

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

George C. Privon 2 年之前
父節點
當前提交
b3924913bd
共有 1 個文件被更改,包括 7 次插入0 次删除
  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