Module
Data.Vector.Polymorphic
- Package
- purescript-polymorphic-vectors
- Repository
- 3ddyy/purescript-polymorphic-vectors
#putInsideMod Source
putInsideMod :: forall n p r. ToRegion n r => AsPosEndo n p => EuclideanRing n => r -> p -> pPut a position inside a region by using the modulus operator
#ratio Source
ratio :: forall n s. ToSize n s => EuclideanRing n => s -> nGet the ratio of a size by dividing the width by the height
#midPos Source
midPos :: forall n p s. ToRegion n s => FromPos n p => EuclideanRing n => s -> pGet the center position of a region
#perpendicular Source
perpendicular :: forall n p. ToPos n p => Semiring n => Eq n => p -> p -> BooleanCheck if two vectors are perpendicular
#parallel Source
parallel :: forall n p. ToPos n p => EuclideanRing n => Eq n => p -> p -> BooleanCheck if two vectors are parallel
#toRectangleWith Source
toRectangleWith :: forall r n. ToRegion n r => Semiring n => (n -> Number) -> r -> RectangleTurn a region into a Rectangle
#toRectangle Source
toRectangle :: forall r. ToRegion Number r => r -> RectangleTurn a region represented with Numbers into a Rectangle
Re-exports from Data.Vector.Polymorphic.Types
#Vector2 Source
data Vector2 aConstructors
Vector2 a a
Instances
(Eq a) => Eq (Vector2 a)(Ord a) => Ord (Vector2 a)(Show a) => Show (Vector2 a)Functor Vector2Apply Vector2Applicative Vector2Bind Vector2Monad Vector2(Semigroup a) => Semigroup (Vector2 a)(Monoid a) => Monoid (Vector2 a)(Semiring a) => Semiring (Vector2 a)Foldable1 Vector2Foldable Vector2Traversable1 Vector2Traversable Vector2Distributive Vector2
#Rect Source
data Rect aConstructors
Instances
(Eq a) => Eq (Rect a)(Ord a) => Ord (Rect a)(Show a) => Show (Rect a)Functor RectApply RectApplicative RectBind RectMonad Rect(Semigroup a) => Semigroup (Rect a)(Monoid a) => Monoid (Rect a)(Semiring a) => Semiring (Rect a)Foldable1 RectFoldable RectTraversable1 RectTraversable RectDistributive Rect