Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bodil/purescript-geom
PureScript 2D matrix transformations
https://github.com/bodil/purescript-geom
Last synced: 23 days ago
JSON representation
PureScript 2D matrix transformations
- Host: GitHub
- URL: https://github.com/bodil/purescript-geom
- Owner: bodil
- Created: 2014-09-20T20:56:57.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-29T23:54:41.000Z (about 10 years ago)
- Last Synced: 2024-11-14T10:06:10.306Z (about 1 month ago)
- Language: PureScript
- Size: 156 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Module Documentation
A library for doing matrix transformations on 2D cartesian coordinates.
```purescript
λ transformPoint (translate 3 4) (Pair 1 2)
(4, 6)
```## Module Data.Geom
### Types
data Pair where
Pair :: Number -> Number -> Pairtype Point = Pair
type Size = Pair
### Type Class Instances
instance eqPair :: Eq Pair
instance semigroupPair :: Semigroup Pair
### Values
addPairs :: Pair -> Pair -> Pair
subPairs :: Pair -> Pair -> Pair
## Module Data.Geom.Monoid
### Type Class Instances
instance monoidPair :: Monoid Pair
## Module Data.Geom.QuickCheck
### Type Class Instances
instance arbPair :: Arbitrary Pair
## Module Data.Geom.Show
### Type Class Instances
instance showPair :: Show Pair
## Module Data.Geom.Transform
### Types
data Transform where
Transform :: Number -> Number -> Number -> Number -> Number -> Number -> Number -> Number -> Number -> Transform### Type Class Instances
instance eqTransform :: Eq Transform
instance semigroupTransform :: Semigroup Transform
### Values
compose :: Transform -> Transform -> Transform
determinant :: Transform -> Number
inverse :: Transform -> Transform
mulN :: Number -> Transform -> Transform
reset :: Transform
rotate :: Number -> Transform
scale :: Number -> Transform
scaleX :: Number -> Transform
scaleY :: Number -> Transform
transformPoint :: Transform -> Point -> Point
translate :: Number -> Number -> Transform
## Module Data.Geom.Transform.Monoid
### Type Class Instances
instance monoidTransform :: Monoid Transform
## Module Data.Geom.Transform.QuickCheck
### Type Class Instances
instance arbTransform :: Arbitrary Transform
## Module Data.Geom.Transform.Show
### Type Class Instances
instance showTransform :: Show Transform