public static int counterClockwise(Vector2f p0, Vector2f p1, Vector2f p2) {
        float dx1, dx2, dy1, dy2;
        dx1 = p1.x - p0.x;
        dy1 = p1.y - p0.y;
        dx2 = p2.x - p0.x;
        dy2 = p2.y - p0.y;
        if (dx1 * dy2 > dy1 * dx2) {
            return 1;
        }
        if (dx1 * dy2 < dy1 * dx2) {
            return -1;
        }
        if ((dx1 * dx2 < 0) || (dy1 * dy2 < 0)) {
            return -1;
        }
        if ((dx1 * dx1 + dy1 * dy1) < (dx2 * dx2 + dy2 * dy2)) {
            return 1;
        }
        return 0;
    }
Given 3 points in a 2d plane, this function computes if the points going from A-B-C
are moving counter clock wise.

@param p0 Point 0.
@param p1 Point 1.
@param p2 Point 2.
@return 1 If they are CCW, -1 if they are not CCW, 0 if p2 is between p0 and p1.
jme3-core/src/main/java/com/jme3/math/FastMath.java