Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Property: int Distance

  • Declared in: RT.Coordinates.Hex

Declaration

int Distance

Summary

Calculates the number of steps required to move from the center hex (0, 0) to the current hex.

Remarks

Note that this is not Euclidean distance. This returns the smallest number of hex tiles that must be traversed to go from (0, 0) to the current hex.

To calculate the distance between two hex tiles h1 and h2, write (h1 - h2).Distance.

To calculate actual Euclidean distance, use Hex.Center and PointD.Distance.