Vector2 is a type and a namespace.

// The namespace contains all types and functions to operates with Vector2
const next = Vector2.add(pointA, velocityA) // add function not implemented yet
// The type Vector2 is an alias to Vector2.ReadonlyVector2
const readonlyPosition: Vector2 = Vector2.Zero()
readonlyPosition.x = 0.1 // this FAILS

// For mutable usage, use `Vector2.Mutable`
const position: Vector2.Mutable = Vector2.One()
position.x = 3.0 // this WORKS

Index

Functions

Type Aliases