### 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 convertAzimuth2xaxisAngle(double azimuth); double alignOrientation( double baseOrientation, double orientation );  }### 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); }