Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Vector2

Index

Constructors

constructor

  • new Vector2(x?: number, y?: number): Vector2

Properties

Private c

c: Array<number> = [0,0]

Accessors

x

  • get x(): number
  • set x(x: number): void

y

  • get y(): number
  • set y(y: number): void

Static DOWN

Static LEFT

Static ONE

Static RIGHT

Static UP

Static ZERO

Methods

add

copy

divide

equals

get

  • get(i: number): number

getCoordinates

  • getCoordinates(): Array<number>

getLength

  • getLength(): number

getSquaredLength

  • getSquaredLength(): number

getX

  • getX(): number

getY

  • getY(): number

multiply

negate

normalize

scale

set

  • set(x: number, y: number): Vector2

setX

setY

subtract

tostring

  • tostring(): string

Static cross

Static distance

Static dot

Generated using TypeDoc