Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class Transformable2D a
- rotate2D :: Transformable2D a => Double -> a -> a
- scale2D :: Transformable2D a => V2 Double -> a -> a
- uScale2D :: Transformable2D a => Double -> a -> a
- translate2D :: Transformable2D a => V2 Double -> a -> a
Documentation
class Transformable2D a Source #
Typeclass for objects that can be manipulated in 2D space
Instances
rotate2D :: Transformable2D a => Double -> a -> a Source #
Rotate by an angle (in radians) about the origin
scale2D :: Transformable2D a => V2 Double -> a -> a Source #
Scale by different amounts along the x and y axes
uScale2D :: Transformable2D a => Double -> a -> a Source #
Scale uniformally along both axes
translate2D :: Transformable2D a => V2 Double -> a -> a Source #
Translate by a distance in 2D space