Click or drag to resize

Distance Methods

The Distance type exposes the following members.

Methods
  NameDescription
Public methodEquals(Object)
Returns true if obj is a Distance with an equal unit and an equal value.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Distance)
Returns true if other has an equal unit and an equal value.
Public methodStatic memberFeet(Double)
Returns a Distance with the specified value and Feet as the unit of measurement.
Public methodGetHashCode
Overridden to ensure consistency with Equals.
(Overrides ValueTypeGetHashCode.)
Public methodIn(DistanceUnit)
Returns a Distance that represents this Distance converted into the specified unit of measurement.
Public methodInFeet
Returns a Distance that represents this Distance converted into feet.
Public methodInKilometres
Returns a Distance that represents this Distance converted into kilometres.
Public methodInMetres
Returns a Distance that represents this Distance converted into metres.
Public methodInMiles
Returns a Distance that represents this Distance converted into miles.
Public methodInt32Value
Returns the distance value, rounded to the nearest integer.
Public methodStatic memberKilometres(Double)
Returns a Distance with the specified value and Kilometres as the unit of measurement.
Public methodStatic memberMetres(Double)
Returns a Distance with the specified value and Metres as the unit of measurement.
Public methodStatic memberMiles(Double)
Returns a Distance with the specified value and Miles as the unit of measurement.
Public methodToString
Returns a non-null, non-empty string representation of this instance for logging and debugging purposes.
(Overrides ValueTypeToString.)
Top
See Also