- public void rotate(final Point3D center, final double angleXZ,
- final double angleYZ) {
- final double s1 = Math.sin(angleXZ);
- final double c1 = Math.cos(angleXZ);
+ /**
+ * Rotate current point around center point by angleXZ and angleYZ.
+ * <p>
+ * See also: <a href="https://marctenbosch.com/quaternions/">Let's remove Quaternions from every 3D Engine</a>
+ *
+ * @param center center point.
+ * @param angleXZ angle around XZ axis.
+ * @param angleYZ angle around YZ axis.
+ */
+ public Point3D rotate(final Point3D center, final double angleXZ,
+ final double angleYZ) {
+ final double s1 = sin(angleXZ);
+ final double c1 = cos(angleXZ);