Maintainer | diagrams-discuss@googlegroups.com |
---|---|
Safe Haskell | None |
Basic types for two-dimensional Euclidean space.
- data R2
- r2 :: (Double, Double) -> R2
- unr2 :: R2 -> (Double, Double)
- type P2 = Point R2
- p2 :: (Double, Double) -> P2
- unp2 :: P2 -> (Double, Double)
- type T2 = Transformation R2
- class Num a => Angle a where
- toCircleFrac :: a -> CircleFrac
- fromCircleFrac :: CircleFrac -> a
- newtype CircleFrac = CircleFrac {}
- newtype Rad = Rad {}
- newtype Deg = Deg {}
- fullCircle :: Angle a => a
- convertAngle :: (Angle a, Angle b) => a -> b
2D Euclidean space
The two-dimensional Euclidean vector space R^2. This type is intentionally abstract.
type T2 = Transformation R2Source
Transformations in R^2.
Angles
class Num a => Angle a whereSource
Type class for types that measure angles.
toCircleFrac :: a -> CircleFracSource
Convert to a fraction of a circle.
fromCircleFrac :: CircleFrac -> aSource
Convert from a fraction of a circle.
newtype CircleFrac Source
Newtype wrapper used to represent angles as fractions of a circle. For example, 13 = tau3 radians = 120 degrees.
Newtype wrapper for representing angles in radians.
Newtype wrapper for representing angles in degrees.
fullCircle :: Angle a => aSource
An angle representing a full circle.
convertAngle :: (Angle a, Angle b) => a -> bSource
Convert between two angle representations.