Class: Point

ge.Point(xnullable, ynullable)

Point class.

Constructor

new Point(xnullable, ynullable)

Point constructor.
Parameters:
Name Type Attributes Description
x number <nullable>
X coordinate.
y number <nullable>
Y coordinate.
Source:

Members

x :number

X coordinate.
Type:
  • number
Source:

y :number

Y coordinate.
Type:
  • number
Source:

Methods

add(p) → {ge.Point}

Add.
Parameters:
Name Type Description
p ge.Point
Source:
Returns:
Type
ge.Point

clone() → {ge.Point}

Clone.
Source:
Returns:
Type
ge.Point

length() → {number}

Return vector length.
Source:
Returns:
Type
number

mul(k) → {ge.Point}

Multiply.
Parameters:
Name Type Description
k number
Source:
Returns:
Type
ge.Point

normalize() → {ge.Point}

Normalize.
Source:
Returns:
Type
ge.Point

rotate(a) → {ge.Point}

Rotate.
Parameters:
Name Type Description
a ge.Angle
Source:
Returns:
Type
ge.Point

sub(p) → {ge.Point}

Subtract.
Parameters:
Name Type Description
p ge.Point
Source:
Returns:
Type
ge.Point