Class: Vector

Vector(pointA, pointB)

A vector represented by two points

Constructor

new Vector(pointA, pointB)

Create a vector.
Parameters:
Name Type Description
pointA Point The origin point.
pointB Point The destination point.
Source:

Members

absDx

The absolute x distance.
Source:

absDy

The absolute y distance.
Source:

diagonal

Is the vector diagonal?
Source:

direction

The direction unit.
Source:

directionX

The x direction.. 1 for right, -1 for left.
Source:

directionY

The y direction.. 1 for down, -1 for up.
Source:

dx

The x distance.
Source:

dy

The y distance.
Source:

magnitude

The magnitude of the vector.
Source:

notOrthogonalOrDiagonal

Is the vector neither orthogonal nor diagonal?
Source:

orthogonal

Is the vector orthogonal?
Source:

orthogonalOrDiagonal

Is the vector orthogonal or diagonal?
Source:

pointA :Point

Type:
Source:

pointB :Point

Type:
Source: