Add Vec#rotate

This commit is contained in:
TheMode 2021-07-11 14:56:48 +02:00
parent b0c2b6d1b6
commit fe3505a6fd

View File

@ -342,6 +342,11 @@ public final class Vec implements Point {
return new Vec(newX, newY, z);
}
@Contract(pure = true)
public @NotNull Vec rotate(double angleX, double angleY, double angleZ) {
return rotateAroundX(angleX).rotateAroundY(angleY).rotateAroundZ(angleZ);
}
/**
* Calculates a linear interpolation between this vector with another
* vector.