Constructors
constructor
- new SATVector(x?, y?): SATVector
Parameters
Optional
x: numberOptional
y: number
Properties
x
x: number
y
y: number
Methods
add
- add(other): SATVector
clone
- clone(): SATVector
copy
- copy(other): SATVector
dot
- dot(other): number
Returns number
len
- len(): number
Returns number
len2
- len2(): number
Returns number
normalize
- normalize(): SATVector
perp
- perp(): SATVector
project
- project(other): SATVector
projectN
- projectN(other): SATVector
reflect
- reflect(axis): SATVector
reflectN
- reflectN(axis): SATVector
reverse
- reverse(): SATVector
rotate
- rotate(angle): SATVector
scale
- scale(x, y?): SATVector
Parameters
- x: number
Optional
y: number
sub
- sub(other): SATVector
This is a simple 2D vector/point class,Vector has two parameters {x},{y}.