MCPcopy Create free account
hub / github.com/Teneted/Tenet / rotateAroundAxis

Method rotateAroundAxis

src/main/java/org/bukkit/util/Vector.java:502–507  ·  view source on GitHub ↗

Rotates the vector around a given arbitrary axis in 3 dimensional space. Rotation will follow the general Right-Hand-Rule, which means rotation will be counterclockwise when the axis is pointing towards the observer. This method will always make sure the provided axis is a unit vector, to n

(@NotNull Vector axis, double angle)

Source from the content-addressed store, hash-verified

500 * null
501 */
502 @NotNull
503 public Vector rotateAroundAxis(@NotNull Vector axis, double angle) throws IllegalArgumentException {
504 Preconditions.checkArgument(axis != null, "The provided axis vector was null");
505
506 return rotateAroundNonUnitAxis(axis.isNormalized() ? axis : axis.clone().normalize(), angle);
507 }
508
509 /**
510 * Rotates the vector around a given arbitrary axis in 3 dimensional space.

Callers

nothing calls this directly

Calls 4

isNormalizedMethod · 0.80
normalizeMethod · 0.80
cloneMethod · 0.65

Tested by

no test coverage detected