Méthode | Description | |
---|---|---|
calculateHaverSineDistVector3 ( float radius, Vector3 pos1, Vector3 pos2 ) : float |
Calculates the haver sine dist with vector3's.
|
|
euclidianDistance ( Vector3 pos1, Vector3 pos2 ) : float |
Euclidians distance between pos1 and pos2
|
|
manhattanDistance ( Vector2 pos1, Vector2 pos2 ) : float |
Manhattans distance between pos1 and pos2.
|
|
squareEuclidianDistance ( Vector3 pos1, Vector3 pos2 ) : float |
Euclidian distance without square root
|
Méthode | Description | |
---|---|---|
convertVector3 ( float radius, Vector3 pos ) : Vector2 |
Convert vector3 to latitude and longitude degrees
|
|
haversineDist ( float radius, Vector2 pos1, Vector2 pos2 ) : float |
Calculate haversine distance between pos1 and pos2 Found at http://forum.unity3d.com/threads/pathfinding-in-a-spherical-world.123161/ https://en.wikipedia.org/wiki/Haversine_formula
|
public static calculateHaverSineDistVector3 ( float radius, Vector3 pos1, Vector3 pos2 ) : float | ||
radius | float | Radius. |
pos1 | Vector3 | Pos1. |
pos2 | Vector3 | Pos2. |
Résultat | float |
public static euclidianDistance ( Vector3 pos1, Vector3 pos2 ) : float | ||
pos1 | Vector3 | Pos1. |
pos2 | Vector3 | Pos2. |
Résultat | float |
public static manhattanDistance ( Vector2 pos1, Vector2 pos2 ) : float | ||
pos1 | Vector2 | Pos1. |
pos2 | Vector2 | Pos2. |
Résultat | float |
public static squareEuclidianDistance ( Vector3 pos1, Vector3 pos2 ) : float | ||
pos1 | Vector3 | |
pos2 | Vector3 | |
Résultat | float |