use of org.apache.sis.measure.ElevationAngle in project sis by apache.
the class CoordinateSystemsTest method assertAngleEquals.
/**
* Asserts that the angle between the given directions is equals to the given value.
* This method tests also the angle by interchanging the given directions.
*/
private static void assertAngleEquals(final boolean isElevation, final double expected, final AxisDirection source, final AxisDirection target) {
final Angle forward = angle(source, target);
final Angle inverse = angle(target, source);
assertEquals(isElevation, forward instanceof ElevationAngle);
assertEquals(isElevation, inverse instanceof ElevationAngle);
assertEquals(+expected, (forward != null) ? forward.degrees() : Double.NaN, STRICT);
assertEquals(-expected, (inverse != null) ? inverse.degrees() : Double.NaN, STRICT);
}
Aggregations