Companion

object Companion

Functions

Link copied to clipboard
fun createArray(n: Int): Array<Vec2?>

Generates an array of length n with zero initialised vectors.

Link copied to clipboard
fun cross(a: Vec2, s: Double): Vec2

Static method for any cross product, same as .cross

fun cross(s: Double, a: Vec2): Vec2

Finds the cross product of a scalar and a vector. Produces a scalar in 2D.

Properties

Link copied to clipboard
val DOWN: Vec2
Link copied to clipboard
val LEFT: Vec2
Link copied to clipboard
val RIGHT: Vec2
Link copied to clipboard
val UP: Vec2
Link copied to clipboard
val ZERO: Vec2