VecmathUtil { static double extent(Vector2d vector) { double radians = Math.atan2(vector.y, vector.x); return radians < 0 ? TAU + radians : radians; } private  VecmathUtil();   }
@Test public void sweepEast() { assertThat(VecmathUtil.extent(new Vector2d(1, 0)), is(closeTo(Math.toRadians(0), 0.01))); }
@Test public void sweepNorth() { assertThat(VecmathUtil.extent(new Vector2d(0, 1)), is(closeTo(Math.toRadians(90), 0.01))); }
@Test public void sweepWest() { assertThat(VecmathUtil.extent(new Vector2d(-1, 0)), is(closeTo(Math.toRadians(180), 0.01))); }
@Test public void sweepSouth() { assertThat(VecmathUtil.extent(new Vector2d(0, -1)), is(closeTo(Math.toRadians(270), 0.01))); }