Moves a 2D coordinate the specified distance towards another coordinate.
moveToward(coord, distance);
Parameter |
Description |
coord |
Can be SGCoord2D, SGCoord3D or SGPosition |
distance |
The distance 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 coord other than SGCoord2D will result in moving the coordinate in a 3D space and then returning only the x and y properties of the new coordinate.