Companion

object Companion

Functions

Link copied to clipboard
fun fromList(list: List<Float>): Vec2

Returns an instance of Vec2 with the given list of coordinates.

Link copied to clipboard
fun fromPolarCoordinates(distance: Float, angle: Angle): Vec2

Returns a 2D vector defined by its polar coordinates: radial distance and angle.

Properties

Link copied to clipboard
val nullVector: Vec2

A null vector.

Link copied to clipboard
val unitX: Vec2

A standard unit vector in the direction of X axis.

Link copied to clipboard
val unitY: Vec2

A standard unit vector in the direction of Y axis.