private Cartographic3 fromRadians(double longitude, double latitude, double height) { YzgMath.CheckNumber_ButweenLeftRight_EqualLeftRight(longitude, -Math.PI, Math.PI); YzgMath.CheckNumber_ButweenLeftRight_EqualLeftRight(latitude, -Math.PI / 2, Math.PI / 2); return(new Cartographic3(longitude, latitude, height)); }
public Cartesian3 Lerp(Cartesian3 start, Cartesian3 end, double scalar) { checkCartesian3(start); checkCartesian3(end); YzgMath.CheckNumber_ButweenLeftRight_EqualLeftRight(scalar, 0.0, 1.0); return(this.lerp(start, end, scalar)); }
private Cartographic3 fromDegrees(double longitude, double latitude, double height) { YzgMath.CheckNumber_ButweenLeftRight_EqualLeftRight(longitude, -180, 180); YzgMath.CheckNumber_ButweenLeftRight_EqualLeftRight(latitude, -90, 90); longitude = YzgMath.DegreeToRadian(longitude); latitude = YzgMath.DegreeToRadian(latitude); return(new Cartographic3(longitude, latitude, height)); }
public Cartesian3 Cartographic3ToCartesian3(Cartographic3 cartographic3, Ellipsoid ellipsoid) { if (cartographic3 == null) { throw new ArgumentNullException("Cartographic3"); } YzgMath.CheckNumber_ButweenLeftRight_EqualLeftRight(cartographic3.Longitude, -Math.PI, Math.PI); YzgMath.CheckNumber_ButweenLeftRight_EqualLeftRight(cartographic3.Latitude, -Math.PI / 2, Math.PI / 2); return(this.fromRadians(cartographic3.Longitude, cartographic3.Latitude, cartographic3.Height, ellipsoid)); }