Module

# Data.Vector.Polymorphic

- Package
- purescript-polymorphic-vectors
- Repository
- 3ddyy/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

### #toRectangleWith Source

`toRectangleWith :: forall n r. ToRegion n r => Semiring n => (n -> Number) -> r -> Rectangle`

Turn a region into a `Rectangle`

### #toRectangle Source

`toRectangle :: forall r. ToRegion Number r => r -> Rectangle`

Turn a rection represented with `Number`

s into a `Rectangle`