@Test
public void testAngles() {

  assertTrue(
      GeometryHullTool.calcAngle(
          new Coordinate(39, 41.5),
          new Coordinate(41, 41),
          new Coordinate(38, 41.2)) > 0);
  assertTrue(
      GeometryHullTool.calcAngle(
          new Coordinate(39, 41.5),
          new Coordinate(41, 41),
          new Coordinate(38, 43)) < 0);
  assertTrue(
      GeometryHullTool.calcAngle(
          new Coordinate(39, 41.5),
          new Coordinate(41, 41),
          new Coordinate(38, 41.2)) < GeometryHullTool.calcAngle(
              new Coordinate(39, 41.5),
              new Coordinate(41, 41),
              new Coordinate(38, 41.1)));
  assertTrue(
      GeometryHullTool.calcAngle(
          new Coordinate(39, 41.5),
          new Coordinate(41, 41),
          new Coordinate(38, 43)) > GeometryHullTool.calcAngle(
              new Coordinate(39, 41.5),
              new Coordinate(41, 41),
              new Coordinate(38, 44)));
  assertTrue(
      GeometryHullTool.calcAngle(
          new Coordinate(42, 42),
          new Coordinate(41, 41),
          new Coordinate(42.5, 44)) > 0);
  assertTrue(
      GeometryHullTool.calcAngle(
          new Coordinate(42, 42),
          new Coordinate(41, 41),
          new Coordinate(42.5, 40.5)) < 0);
  assertEquals(
      -90.0,
      GeometryHullTool.calcAngle(
          new Coordinate(41, 42),
          new Coordinate(41, 41),
          new Coordinate(42, 41)),
      0.001);
  assertEquals(
      90.0,
      GeometryHullTool.calcAngle(
          new Coordinate(42, 41),
          new Coordinate(41, 41),
          new Coordinate(41, 42)),
      0.001);
  assertEquals(
      -180,
      GeometryHullTool.calcAngle(
          new Coordinate(42, 42),
          new Coordinate(41, 41),
          new Coordinate(40, 40)),
      0.001);
  assertEquals(
      0,
      GeometryHullTool.calcAngle(
          new Coordinate(42, 42),
          new Coordinate(41, 41),
          new Coordinate(42, 42)),
      0.001);
  assertEquals(
      -315,
      GeometryHullTool.calcAngle(
          new Coordinate(41, 41),
          new Coordinate(42, 41),
          new Coordinate(41, 40)),
      0.001);
  assertEquals(
      -45,
      GeometryHullTool.calcAngle(
          new Coordinate(42, 41),
          new Coordinate(41, 41),
          new Coordinate(42, 40)),
      0.001);
  assertEquals(
      -45,
      GeometryHullTool.calcAngle(
          new Coordinate(41, 42),
          new Coordinate(41, 41),
          new Coordinate(42, 42)),
      0.001);
}