summaryrefslogtreecommitdiff
path: root/testsuite/tests/programs/galois_raytrace/Primitives.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/programs/galois_raytrace/Primitives.hs')
-rw-r--r--testsuite/tests/programs/galois_raytrace/Primitives.hs24
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/tests/programs/galois_raytrace/Primitives.hs b/testsuite/tests/programs/galois_raytrace/Primitives.hs
new file mode 100644
index 0000000000..2f21654055
--- /dev/null
+++ b/testsuite/tests/programs/galois_raytrace/Primitives.hs
@@ -0,0 +1,24 @@
+-- Copyright (c) 2000 Galois Connections, Inc.
+-- All rights reserved. This software is distributed as
+-- free software under the license in the file "LICENSE",
+-- which is included in the distribution.
+
+module Primitives where
+
+rad2deg :: Double -> Double
+rad2deg r = r * 180 / pi
+
+deg2rad :: Double -> Double
+deg2rad d = d * pi / 180
+
+addi :: Int -> Int -> Int
+addi = (+)
+
+addf :: Double -> Double -> Double
+addf = (+)
+
+acosD :: Double -> Double
+acosD x = acos x * 180 / pi
+
+asinD :: Double -> Double
+asinD x = asin x * 180 / pi