move Method

Moves a 2D coordinate the specified distance and direction.

move(distance, [yaw], [pitch]);

 

Parameter

Description

distance

The distance to move

yaw

Optional, default: 0.0

The direction to move

pitch

Optional, default: 0.0

The pitch angle to move

Return Value

An SGCoord2D object that represents the new position after the move.

Remarks

Because SGCoord2D class does not have a height property, specifying pitch other than 0.0 will result in moving the coordinate in a 3D space and then returning only the x and y properties of the new coordinate.