Vectors { public static Vector rotate(Vector vector, double angleX, double angleY, double angleZ) { rotateAroundXAxis(vector, angleX); rotateAroundYAxis(vector, angleY); rotateAroundZAxis(vector, angleZ); return vector; }  static Vector rotate(Vector vector, double angleX, double angleY, double angleZ); static Vector rotateAroundXAxis(Vector vector, double angle); static Vector rotateAroundYAxis(Vector vector, double angle); static Vector rotateAroundZAxis(Vector vector, double angle); static Vector rotate(Vector vector, Location pivot); static Vector rotate(Vector vector, float yawDegrees, float pitchDegrees); static Location rotate(Location location, Location pivot); static Location rotate(Location location, float yawDegrees, float pitchDegrees); static double angleToXAxis(Vector vector);  }
@Test void rotate_vector_radians() { assertEquals(new Vector(1.6947429641668934, 2.186059878281388, 2.519719923716756), Vectors.rotate(vector, 3, 3, 3)); }
@Test void rotate_vector_pivot() { assertEquals(new Vector(1, -2, -3), Vectors.rotate(vector, pivot)); }
@Test void rotate_vector_degrees() { assertEquals(new Vector(1, -2, -3), Vectors.rotate(vector, 90, -180)); }
@Test void roatate_location_pivot() { assertEquals(new Point(null, 3, -2, -1), Vectors.rotate(position, pivot)); }
@Test void roatate_location_degrees() { assertEquals(new Point(null, 3, -2, -1), Vectors.rotate(position, 90, -180)); }
@Test void rotate_reducer() { assertEquals(new Vector(1, -2, -3), Vectors.rotate((v, x, y, z) -> v.setX(x).setY(y).setZ(z), vector, 1, 2, 3, 90, 180)); }