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)
| 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. |
nothing calls this directly
no test coverage detected