public boolean isClockwise(double aX, double aY, double bX, double bY, double cX, double cY) {
        // simply compare angles between a,b and b,c
        final double angleDiff = (cX - aX) * (bY - aY) - (cY - aY) * (bX - aX);
        return angleDiff < 0;
    }
@Test
    public void testIsClockwise() {
        Coordinate a = new Coordinate(0.1, 1);
        Coordinate b = new Coordinate(0.2, 0.8);
        Coordinate c = new Coordinate(0.6, 0.3);
        assertTrue(isClockwise(a, b, c));
        assertTrue(isClockwise(b, c, a));
        assertTrue(isClockwise(c, a, b));
        assertFalse(isClockwise(c, b, a));
        assertFalse(isClockwise(a, c, b));
        assertFalse(isClockwise(b, a, c));
    }