Constructors
constructor
- new Vector(_x?: number, _y?: number): Vector
-
Parameters
-
Default value _x: number = 0
-
Default value _y: number = 0
Methods
scale
- scale(_factor: number): void
set
- set(_x: number, _y: number): void
Static getPolar
- getPolar(_angle: number, _length: number): Vector
-
Parameters
-
_angle: number
-
_length: number
Static getRandom
- getRandom(_minLength: number, _maxLength: number): Vector
-
Parameters
-
_minLength: number
-
_maxLength: number
Describes a two-dimensional vector and implements various helpful methods to use it.