Constructor
new Vector(pointA, pointB)
Create a vector.
Parameters:
| Name | Type | Description |
|---|---|---|
pointA |
Point | The origin point. |
pointB |
Point | The destination point. |
Members
absDx
The absolute x distance.
absDy
The absolute y distance.
diagonal
Is the vector diagonal?
direction
The direction unit.
directionX
The x direction..
1 for right, -1 for left.
directionY
The y direction..
1 for down, -1 for up.
dx
The x distance.
dy
The y distance.
magnitude
The magnitude of the vector.
notOrthogonalOrDiagonal
Is the vector neither orthogonal nor diagonal?
orthogonal
Is the vector orthogonal?
orthogonalOrDiagonal
Is the vector orthogonal or diagonal?