vector property

Vector3 get vector

Implementation

Vector3 get vector {
  var latRad = latitude * degrees2Radians;
  var lonRad = longitude * degrees2Radians;

  //Polar to vector
  var x = cos(lonRad) * cos(latRad);
  var y = sin(lonRad) * cos(latRad);
  var z = sin(latRad);

  return Vector3(x, y, z);
}