public final Angle addRadians(double radians) { return Angle.fromRadians(this.radians + radians); }
public final Angle subtractRadians(double radians) { return Angle.fromRadians(this.radians - radians); }
public final Angle addRadians(double radians) { return Angle.fromRadians(this.radians + radians); }
public final Angle subtractRadians(double radians) { return Angle.fromRadians(this.radians - radians); }
public static Angle atan(double tan) { //Tom: this method is not used, should we delete it? (13th Dec 06) return Angle.fromRadians(Math.atan(tan)); }
public static Angle asin(double sine) { return Angle.fromRadians(Math.asin(sine)); }
public static Angle acos(double cosine) { //Tom: this method is not used, should we delete it? (13th Dec 06) return Angle.fromRadians(Math.acos(cosine)); }
public static Angle atan(double tan) { //Tom: this method is not used, should we delete it? (13th Dec 06) return Angle.fromRadians(Math.atan(tan)); }
public static Angle asin(double sine) { return Angle.fromRadians(Math.asin(sine)); }
public static Angle acos(double cosine) { //Tom: this method is not used, should we delete it? (13th Dec 06) return Angle.fromRadians(Math.acos(cosine)); }
public final Angle getRotationY() { double yRadians = Math.asin(this.m13); if (Double.isNaN(yRadians)) return null; return Angle.fromRadians(yRadians); }
public final Angle getRotationX() { double radians = Math.atan2((2.0 * this.x * this.w) - (2.0 * this.y * this.z), 1.0 - 2.0 * (this.x * this.x) - 2.0 * (this.z * this.z)); if (Double.isNaN(radians)) return null; return Angle.fromRadians(radians); }
/** * Creates a new <code>Sector</code> and initializes it to the specified angles. The angles are assumed to be * normalized to +/- \u03c0/2 radians latitude and +/- \u03c0 radians longitude, but this method does not verify * that. * * @param minLatitude the sector's minimum latitude in radians. * @param maxLatitude the sector's maximum latitude in radians. * @param minLongitude the sector's minimum longitude in radians. * @param maxLongitude the sector's maximum longitude in radians. * * @return the new <code>Sector</code> */ public static Sector fromRadians(double minLatitude, double maxLatitude, double minLongitude, double maxLongitude) { return new Sector(Angle.fromRadians(minLatitude), Angle.fromRadians(maxLatitude), Angle.fromRadians( minLongitude), Angle.fromRadians(maxLongitude)); }
public final Angle getRotationZ() { double radians = Math.asin((2.0 * this.x * this.y) + (2.0 * this.z * this.w)); if (Double.isNaN(radians)) return null; return Angle.fromRadians(radians); }
public final Angle getRotationY() { double radians = Math.atan2((2.0 * this.y * this.w) - (2.0 * this.x * this.z), 1.0 - (2.0 * this.y * this.y) - (2.0 * this.z * this.z)); if (Double.isNaN(radians)) return null; return Angle.fromRadians(radians); }
public static Position fromRadians(double latitude, double longitude, double elevation) { return new Position(Angle.fromRadians(latitude), Angle.fromRadians(longitude), elevation); }
/** * Computes the location on a rhumb line with the given starting location, rhumb azimuth, and arc distance along the * line. * * @param p LatLon of the starting location * @param rhumbAzimuthRadians rhumb azimuth angle (clockwise from North), in radians * @param pathLengthRadians arc distance to travel, in radians * * @return LatLon location on the rhumb line. */ public static LatLon rhumbEndPosition(LatLon p, double rhumbAzimuthRadians, double pathLengthRadians) { if (p == null) { throw new IllegalArgumentException("LatLon Is Null"); } return rhumbEndPosition(p, Angle.fromRadians(rhumbAzimuthRadians), Angle.fromRadians(pathLengthRadians)); }
/** * Computes the location on a great circle arc with the given starting location, azimuth, and arc distance. * * @param p LatLon of the starting location * @param greatCircleAzimuthRadians great circle azimuth angle (clockwise from North), in radians * @param pathLengthRadians arc distance to travel, in radians * * @return LatLon location on the great circle arc. */ public static LatLon greatCircleEndPosition(LatLon p, double greatCircleAzimuthRadians, double pathLengthRadians) { if (p == null) { throw new IllegalArgumentException("Lat Lon Is Null"); } return greatCircleEndPosition(p, Angle.fromRadians(greatCircleAzimuthRadians), Angle.fromRadians(pathLengthRadians)); }
@Nonnull public static Angle gudermannian (final double percent) { //see http://en.wikipedia.org/wiki/Mercator_projection return Angle.fromRadians(Math.atan(Math.sinh(percent * Math.PI))); }
public final Angle getAngle() { double w = this.w; double length = this.getLength(); if (!isZero(length) && (length != 1.0)) w /= length; double radians = 2.0 * Math.acos(w); if (Double.isNaN(radians)) return null; return Angle.fromRadians(radians); }