# Data.Vector.Polymorphic.Class

- Package
- purescript-polymorphic-vectors
- Repository
- 3ddyy/purescript-polymorphic-vectors

### #AsPosEndo Source

`class AsPosEndo a pa | pa -> a where`

Class describing types which represent a position on a 2D plane and can be
modified by any function of type `Vector2 a -> Vector2 a`

.

Instances must satisfy the following law:

- Identity:
`asPosEndo identity = identity`

#### Members

#### Instances

### #AsPos Source

`class AsPos a b pa pb | pa -> a, pb -> b where`

Class describing types which represent a position on a 2D plane and can be
modified by any function of type `Vector2 a -> Vector2 b`

.

Instances must satisfy the following law:

- Identity:
`asPos identity = identity`

#### Members

#### Instances

### #AsSizeEndo Source

`class AsSizeEndo a sa | sa -> a where`

Class describing types which represent a size on a 2D plane and can be
modified by any function of type `Vector2 a -> Vector2 a`

.

Instances must satisfy the following law:

- Identity:
`asSizeEndo identity = identity`

#### Members

`asSizeEndo :: (Vector2 a -> Vector2 a) -> sa -> sa`

#### Instances

`AsSizeEndo a (Vector2 a)`

`AsSizeEndo a (Rect a)`

### #AsSize Source

`class AsSize a b sa sb | sa -> a, sb -> b where`

Class describing types which represent a size on a 2D plane and can be
modified by any function of type `Vector2 a -> Vector2 b`

.

Instances must satisfy the following law:

- Identity:
`asSize identity = identity`

#### Members

#### Instances

### #FromRegion Source

`class FromRegion a ra | ra -> a where`

Class describing types which represent a rectangular region on a 2D plane
and can be constructed from a `Rect a`

.

#### Members

`fromRegion :: Rect a -> ra`

#### Instances

`FromRegion a (Vector2 a)`

`FromRegion a (Rect a)`

### #AsRegionEndo Source

`class AsRegionEndo a ra | ra -> a where`

Class describing types which represent a rectangular region on a 2D plane
and can be modified by any function of type `Rect a -> Rect a`

.

Instances must satisfy the following law:

- Identity:
`asRegionEndo identity = identity`

#### Members

`asRegionEndo :: (Rect a -> Rect a) -> ra -> ra`

#### Instances

`(Semiring a) => AsRegionEndo a (Vector2 a)`

`AsRegionEndo a (Rect a)`