toVector3 static method
Implementation
static Vector3 toVector3(double lat, double lng) {
var latRad = MathUtil.toRadians(lat).toDouble();
var lonRad = MathUtil.toRadians(lng).toDouble();
var x = math.cos(lonRad) * math.cos(latRad);
var y = math.sin(lonRad) * math.cos(latRad);
var z = math.sin(latRad);
return Vector3(x, y, z);
}