code: public Quaterniond nlerp(Quaterniondc q, double factor, Quaterniond dest) {
          double cosom = x * q.x() + y * q.y() + z * q.z() + w * q.w();
          double scale0 = 1.0 - factor;
          double scale1 = (cosom >= 0.0) ? factor : -factor;
          dest.x = scale0 * x + scale1 * q.x();
          dest.y = scale0 * y + scale1 * q.y();
          dest.z = scale0 * z + scale1 * q.z();
          dest.w = scale0 * w + scale1 * q.w();
          double s = 1.0 / Math.sqrt(dest.x * dest.x + dest.y * dest.y + dest.z * dest.z + dest.w * dest.w);
          dest.x *= s;
          dest.y *= s;
          dest.z *= s;
          dest.w *= s;
          return dest;
      }
docs: /* (non-Javadoc)
  @see org.joml.Quaterniondc#nlerp(org.joml.Quaterniondc, double, org.joml.Quaterniond)