summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/programs/galois_raytrace/Primitives.hs
blob: 2f216540550628889b17820a80461f5ab4430da6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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