SGCoord2D Class

This class represents a two dimensional coordinate (x,y) in the SGWorld, usually a latitude, longitude coordinate.

Constructor

Name

Description

Constructor

Initializes a new instance of the SGPCoord2D class.

Properties

Name

Description

x Property

The x coordinate, usually longitude.

y Property

The y coordinate, usually latitude.

Methods

Name

Description

move Method

Moves a 2D coordinate the specified distance and direction.

moveToward Method

Moves a 2D coordinate the specified distance towards another coordinate.

lerp Method

Moves a 2D coordinate the specified percentage towards another coordinate.

distanceTo Method

Measures the distance between two coordinates.

anglesTo Method

Measures the angles (yaw and pitch) between two coordinates.

isEqual Method

Compare the properties values of this SGCoord2D object to another SGCoord2D object.