vec2(x: number, y: number): Vec2
Create a 2D vector.
// { x: 0, y: 0 } vec2() // { x: 10, y: 10 } vec2(10) // { x: 100, y: 80 } vec2(100, 80) // move to 150 degrees direction with by length 10 player.pos = pos.add(Vec2.fromAngle(150).scale(10))
returns
The vector.
since
v2000.0