class Vector2d extends AbstractVector implements Serializable {

    public static int counterClockwise(Vector2d p0, Vector2d p1, Vector2d p2)
    {
        double dx1 = p1.getX() - p0.getX();
        double dy1 = p1.getY() - p0.getY();
        double dx2 = p2.getX() - p0.getX();
        double dy2 = p2.getY() - p0.getY();
        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;
    }

    public  Vector2d(double x, double y);
    public  Vector2d(Vector2d vec);
    public  Vector2d(Vector2i vec);

}