Geometry.dcl 402 Bytes
Newer Older
1 2 3 4
definition module Math.Geometry

from StdEnv import class ==, class <, class +, class -, class sign

5
//* The constant pi.
6
pi :== 3.14159265359
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

:: Angle
  = Deg !Real
  | Rad !Real

rad :: !Real -> Angle
deg :: !Real -> Angle

toDeg     :: !Angle -> Real
toRad     :: !Angle -> Real
normalize :: !Angle -> Angle

instance == Angle
instance < Angle
instance + Angle
instance - Angle
instance sign Angle