C# Class AbstractedSheep.ShuttleTrackerWorld.Coordinate

Represents an immutable Latitude, Longitude pair on Earth.
Show file Open project: AbstractedSheep/Shuttle-Tracker

Public Methods

Method Description
BearingTowards ( Coordinate c ) : double

Calculates the bearing towards another Coordinate.

ClosestPoint ( Coordinate endpoint1, Coordinate endpoint2 ) : Coordinate

Calculates the closest Coordinate to a line created by two other Coordinates. The resulting Coordinate is not garunteed to fall between the two endpoint Coordinates.

Coordinate ( int latitudeE6, int longitudeE6 ) : System
DistanceTo ( Coordinate c ) : double

Calculates the distance in miles to another Coordinate

Equals ( object obj ) : bool
GetHashCode ( ) : int
ToString ( ) : string
operator ( ) : bool

Private Methods

Method Description
DegToRad ( double degrees ) : double
RadToDeg ( double rad ) : double

Method Details

BearingTowards() public method

Calculates the bearing towards another Coordinate.
public BearingTowards ( Coordinate c ) : double
c Coordinate The Coordinate to get the bearing towards.
return double

ClosestPoint() public method

Calculates the closest Coordinate to a line created by two other Coordinates. The resulting Coordinate is not garunteed to fall between the two endpoint Coordinates.
public ClosestPoint ( Coordinate endpoint1, Coordinate endpoint2 ) : Coordinate
endpoint1 Coordinate A Coordinate on the line.
endpoint2 Coordinate Another Coordinate on the line.
return Coordinate

Coordinate() public method

public Coordinate ( int latitudeE6, int longitudeE6 ) : System
latitudeE6 int
longitudeE6 int
return System

DistanceTo() public method

Calculates the distance in miles to another Coordinate
public DistanceTo ( Coordinate c ) : double
c Coordinate The Coordinate to measure the distance to.
return double

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

ToString() public method

public ToString ( ) : string
return string

operator() public static method

public static operator ( ) : bool
return bool