Distance Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Struct that encapsulates a distance (natively stored as a double of meters).
public struct Distance
type Distance = struct
- Inheritance
-
System.ValueTypeDistance
Constructors
Distance(Double) |
Creates a new Distance that represents the distance described by |
Properties
Kilometers |
Gets the distance in kilometers that is spanned by |
Meters |
Gets the distance in meters that is spanned by |
Miles |
Gets the distance in miles that is spanned by |
Methods
BetweenPositions(Position, Position) | |
Equals(Distance) |
Whether a Distance has exactly the same values as |
Equals(Object) |
Whether an System.Object is a Distance and has exactly the same values as |
FromKilometers(Double) |
Factory method to create a Distance from a value provided in kilometers. |
FromMeters(Double) |
Factory method to create a Distance from a value provided in meters. |
FromMiles(Double) |
Factory method to create a Distance from a value provided in miles. |
GetHashCode() |
The hashcode for the Distance. |
Operators
Equality(Distance, Distance) |
Whether two Distances have Meters properties that are exactly the same. |
Inequality(Distance, Distance) |