- Preparing search index...
- The search index is not available
crisp-game-lib
Accessors
angle
- get angle(): number
-
Returns number
length
- get length(): number
-
Returns number
Methods
addWithAngle
- addWithAngle(angle: number, length: number): Vector
-
Parameters
-
angle: number
-
length: number
angleTo
- angleTo(x: number | VectorLike, y?: number): number
-
Returns number
clamp
- clamp(xLow: number, xHigh: number, yLow: number, yHigh: number): Vector
-
Parameters
-
xLow: number
-
xHigh: number
-
yLow: number
-
yHigh: number
distanceTo
- distanceTo(x: number | VectorLike, y?: number): number
-
Returns number
equals
- equals(other: VectorLike): boolean
-
Returns boolean
isInRect
- isInRect(x: number, y: number, width: number, height: number): boolean
-
Parameters
-
x: number
-
y: number
-
width: number
-
height: number
Returns boolean
wrap
- wrap(xLow: number, xHigh: number, yLow: number, yHigh: number): Vector
-
Parameters
-
xLow: number
-
xHigh: number
-
yLow: number
-
yHigh: number
A two-dimensional vector class with functions useful for working with (x, y) coordinates.