public Rotation(float degrees, float px, float py) {
        this.degrees = degrees;
        this.radians = Math.toRadians(degrees);
        this.px = px;
        this.py = py;
    }
@Test
    public void rotationTest() {
        Rotation rotation1 = new Rotation(1, 0, 0);
        Rotation noRotation = new Rotation(0, 0, 0);
        Rotation fullRotation = new Rotation(360, 44, 31);
        Rotation halfRotation = new Rotation(180, 44, 31);
        Rotation aroundOrigin = new Rotation(90, 0, 0);

        Point origin = new Point(3344.22d, 4455.33d);
        Point tmp = rotation1.rotate(origin);
        Point result = rotation1.reverseRotation().rotate(tmp);

        Assert.assertEquals(origin.x, result.x, 0.0001d);
        Assert.assertEquals(origin.y, result.y, 0.0001d);

        result = noRotation.rotate(origin);
        Assert.assertEquals(origin, result);
        result = noRotation.reverseRotation().rotate(origin);
        Assert.assertEquals(origin, result);

        result = origin.rotate(aroundOrigin);
        Assert.assertEquals(origin.y, result.x, 0.0001);
        Assert.assertEquals(-origin.x, result.y, 0.0001);

        result = fullRotation.rotate(origin);
        Assert.assertEquals(origin.x, result.x, 0.0001);
        Assert.assertEquals(origin.y, result.y, 0.0001);
        result = fullRotation.reverseRotation().rotate(origin);
        Assert.assertEquals(origin.y, result.y, 0.0001);
        Assert.assertEquals(origin.x, result.x, 0.0001);

        result = halfRotation.rotate(origin);
        result = halfRotation.rotate(result);
        Assert.assertEquals(origin.x, result.x, 0.0001);
        Assert.assertEquals(origin.y, result.y, 0.0001);
        result = fullRotation.reverseRotation().rotate(result);
        Assert.assertEquals(origin.y, result.y, 0.0001);
        Assert.assertEquals(origin.x, result.x, 0.0001);

        result = origin.rotate(noRotation).rotate(halfRotation).rotate(noRotation).rotate(halfRotation);
        Assert.assertEquals(origin.y, result.y, 0.0001);
        Assert.assertEquals(origin.x, result.x, 0.0001);
    }