Vector2.toArray()

Exports the vector as an array with two values

Parameters

None

Return value

number[]

The vector exported as an array

Usage

import {Vector2} from '@lcluber/type6js';

let vector1 = new Vector2(1,1);
let array = vector1.toArray();
console.log(array); // [1,1]