public final class RotationHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static Vec<Three> |
rotatePoint(Vec<Three> point,
Vec<Three> center,
Rotation rot)
Rotates a point around a specified center by using a given rotation.
|
static java.util.Optional<Vec<Three>> |
rotatePointOptional(Vec<Three> point,
Vec<Three> center,
Rotation rot)
Rotates a point around a specified center by using a given rotation.
|
public static Vec<Three> rotatePoint(Vec<Three> point, Vec<Three> center, Rotation rot)
point - the point which should be rotatedcenter - the center of the rotationrot - the rotation which should be used to rotate the pointjava.lang.NullPointerException - if one of the arguments is nulljava.lang.IllegalArgumentException - if the rotated vector lies outside of the vector spacepublic static java.util.Optional<Vec<Three>> rotatePointOptional(Vec<Three> point, Vec<Three> center, Rotation rot)
point - the point which should be rotatedcenter - the center of the rotationrot - the rotation which should be used to rotate the pointOptional is returned.java.lang.NullPointerException - if one of the arguments is null