Module
Data.Vector.Polymorphic
- Package
- purescript-polymorphic-vectors
- Repository
- artemisSystem/purescript-polymorphic-vectors
#putInsideMod Source
putInsideMod :: forall r p n. ToRegion n r => AsPosEndo n p => EuclideanRing n => r -> p -> p
Put a position inside a region by using the modulus operator
#ratio Source
ratio :: forall s n. ToSize n s => EuclideanRing n => s -> n
Get the ratio of a size by dividing the width by the height
#midPos Source
midPos :: forall s p n. ToRegion n s => FromPos n p => EuclideanRing n => s -> p
Get the center position of a region
#perpendicular Source
perpendicular :: forall p n. ToPos n p => Semiring n => Eq n => p -> p -> Boolean
Check if two vectors are perpendicular
#parallel Source
parallel :: forall p n. ToPos n p => EuclideanRing n => Eq n => p -> p -> Boolean
Check if two vectors are parallel
#convertPos Source
convertPos :: forall p1 p2 n. ToPos n p1 => FromPos n p2 => p1 -> p2
#convertSize Source
convertSize :: forall p1 p2 n. ToSize n p1 => FromSize n p2 => p1 -> p2
#convertRegion Source
convertRegion :: forall p1 p2 n. ToRegion n p1 => FromRegion n p2 => p1 -> p2
Re-exports from Data.Vector.Polymorphic.Types
#Vector2 Source
data Vector2 a
Constructors
Vector2 a a
Instances
Generic (Vector2 a) _
(Eq a) => Eq (Vector2 a)
(Ord a) => Ord (Vector2 a)
(Show a) => Show (Vector2 a)
Functor Vector2
Apply Vector2
Applicative Vector2
Bind Vector2
Monad Vector2
(Semigroup a) => Semigroup (Vector2 a)
(Monoid a) => Monoid (Vector2 a)
(Semiring a) => Semiring (Vector2 a)
(Ring a) => Ring (Vector2 a)
(DivisionRing a) => DivisionRing (Vector2 a)
(CommutativeRing a) => CommutativeRing (Vector2 a)
(EuclideanRing a) => EuclideanRing (Vector2 a)
Foldable1 Vector2
Foldable Vector2
Traversable1 Vector2
Traversable Vector2
Distributive Vector2
#Rect Source
data Rect a
Constructors
Instances
Generic (Rect a) _
(Eq a) => Eq (Rect a)
(Ord a) => Ord (Rect a)
(Show a) => Show (Rect a)
Functor Rect
Apply Rect
Applicative Rect
Bind Rect
Monad Rect
(Semigroup a) => Semigroup (Rect a)
(Monoid a) => Monoid (Rect a)
(Semiring a) => Semiring (Rect a)
Foldable1 Rect
Foldable Rect
Traversable1 Rect
Traversable Rect
Distributive Rect