Vectors { public static Vector rotateAroundZAxis(Vector vector, double angle) { double cos = cos(angle); double sin = sin(angle); double x = vector.getX() * cos - vector.getY() * sin; double y = vector.getX() * sin + vector.getY() * cos; return vector.setX(x).setY(y); }  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 rotateAroundZAxis() { assertEquals(new Vector(-1.27223251272018, -1.8388649851410237, 3.0), Vectors.rotateAroundZAxis(vector, 3)); }