### Question:
AngleCalc { public double convertAzimuth2xaxisAngle(double azimuth) { if (Double.compare(azimuth, 360) > 0 || Double.compare(azimuth, 0) < 0) { throw new IllegalArgumentException("Azimuth " + azimuth + " must be in (0, 360)"); } double angleXY = PI_2 - azimuth / 180. * Math.PI; if (angleXY < -Math.PI) angleXY += 2 * Math.PI; if (angleXY > Math.PI) angleXY -= 2 * Math.PI; return angleXY; }  double calcOrientation(double lat1, double lon1, double lat2, double lon2); double calcOrientation(double lat1, double lon1, double lat2, double lon2, boolean exact); double convertAzimuth2xaxisAngle(double azimuth); double alignOrientation(double baseOrientation, double orientation); double calcAzimuth(double lat1, double lon1, double lat2, double lon2); boolean isClockwise(double aX, double aY, double bX, double bY, double cX, double cY);  }### Answer:
@Test public void testConvertAzimuth2xAxisAngle() { assertEquals(Math.PI / 2, AC.convertAzimuth2xaxisAngle(0), 1E-6); assertEquals(Math.PI / 2, Math.abs(AC.convertAzimuth2xaxisAngle(360)), 1E-6); assertEquals(0, AC.convertAzimuth2xaxisAngle(90), 1E-6); assertEquals(-Math.PI / 2, AC.convertAzimuth2xaxisAngle(180), 1E-6); assertEquals(Math.PI, Math.abs(AC.convertAzimuth2xaxisAngle(270)), 1E-6); assertEquals(-3 * Math.PI / 4, AC.convertAzimuth2xaxisAngle(225), 1E-6); assertEquals(3 * Math.PI / 4, AC.convertAzimuth2xaxisAngle(315), 1E-6); }