Vectors { public static Vector rotateAroundXAxis(Vector vector, double angle) { double cos = cos(angle); double sin = sin(angle); double y = vector.getY() * cos - vector.getZ() * sin; double z = vector.getY() * sin + vector.getZ() * cos; return vector.setY(y).setZ(z); }  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 rotateAroundXAxis() { assertEquals(new Vector(1.0, -2.4033450173804924, -2.687737473681602), Vectors.rotateAroundXAxis(vector, 3)); }