/* (non-Javadoc)
@see org.joml.Quaternionfc#rotateTo(org.joml.Vector3fc, org.joml.Vector3fc, org.joml.Quaternionf)
166266
public Quaternionf rotateTo(Vector3fc fromDir, Vector3fc toDir, Quaternionf dest) {
        return rotateTo(fromDir.x(), fromDir.y(), fromDir.z(), toDir.x(), toDir.y(), toDir.z(), dest);
    }
377208
public Quaterniond setAngleAxis(double angle, Vector3dc axis) {
        return setAngleAxis(angle, axis.x(), axis.y(), axis.z());
    }
1074502
public void rotate(double angle, double vx, double vy, double vz) {
		gl.glRotated(angle, vx, vy, vz);
	}
366385
public Matrix4f rotateAroundLocal(Quaternionfc quat, float ox, float oy, float oz, Matrix4f dest) {
        float w2 = quat.w() * quat.w();
        float x2 = quat.x() * quat.x();
        float y2 = quat.y() * quat.y();
        float z2 = quat.z() * quat.z();
        float zw = quat.z() * quat.w();
        float xy = quat.x() * quat.y();
        float xz = quat.x() * quat.z();
        float yw = quat.y() * quat.w();
        float yz = quat.y() * quat.z();
        float xw = quat.x() * quat.w();
        float lm00 = w2 + x2 - z2 - y2;
        float lm01 = xy + zw + zw + xy;
        float lm02 = xz - yw + xz - yw;
        float lm10 = -zw + xy - zw + xy;
        float lm11 = y2 - z2 + w2 - x2;
        float lm12 = yz + yz + xw + xw;
        float lm20 = yw + xz + xz + yw;
        float lm21 = yz + yz - xw - xw;
        float lm22 = z2 - y2 - x2 + w2;
        float tm00 = m00 - ox * m03;
        float tm01 = m01 - oy * m03;
        float tm02 = m02 - oz * m03;
        float tm10 = m10 - ox * m13;
        float tm11 = m11 - oy * m13;
        float tm12 = m12 - oz * m13;
        float tm20 = m20 - ox * m23;
        float tm21 = m21 - oy * m23;
        float tm22 = m22 - oz * m23;
        float tm30 = m30 - ox * m33;
        float tm31 = m31 - oy * m33;
        float tm32 = m32 - oz * m33;
        dest._m00(lm00 * tm00 + lm10 * tm01 + lm20 * tm02 + ox * m03);
        dest._m01(lm01 * tm00 + lm11 * tm01 + lm21 * tm02 + oy * m03);
        dest._m02(lm02 * tm00 + lm12 * tm01 + lm22 * tm02 + oz * m03);
        dest._m03(m03);
        dest._m10(lm00 * tm10 + lm10 * tm11 + lm20 * tm12 + ox * m13);
        dest._m11(lm01 * tm10 + lm11 * tm11 + lm21 * tm12 + oy * m13);
        dest._m12(lm02 * tm10 + lm12 * tm11 + lm22 * tm12 + oz * m13);
        dest._m13(m13);
        dest._m20(lm00 * tm20 + lm10 * tm21 + lm20 * tm22 + ox * m23);
        dest._m21(lm01 * tm20 + lm11 * tm21 + lm21 * tm22 + oy * m23);
        dest._m22(lm02 * tm20 + lm12 * tm21 + lm22 * tm22 + oz * m23);
        dest._m23(m23);
        dest._m30(lm00 * tm30 + lm10 * tm31 + lm20 * tm32 + ox * m33);
        dest._m31(lm01 * tm30 + lm11 * tm31 + lm21 * tm32 + oy * m33);
        dest._m32(lm02 * tm30 + lm12 * tm31 + lm22 * tm32 + oz * m33);
        dest._m33(m33);
        dest._properties(properties & ~(PROPERTY_PERSPECTIVE | PROPERTY_IDENTITY | PROPERTY_TRANSLATION));
        return dest;
    }
388388
public void setRotation(Quaternionf rotation) {
        setRotation(rotation.w, rotation.x, rotation.y,
                rotation.z);
    }
831255
@Override
	public void translate(float x, float y, float z)
	{
		transformMatrix.translate(new Vector3f(x, y, z));
	}
597161
public void rotate(double angle_in_Radians) {
		Transformation2D temp = new Transformation2D();
		temp.setRotate(angle_in_Radians);
		multiply(temp);
	}
634701
public Matrix4d rotateAround(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) {
        if ((properties & PROPERTY_IDENTITY) != 0)
            return rotationAround(quat, ox, oy, oz);
        else if ((properties & PROPERTY_AFFINE) != 0)
            return rotateAroundAffine(quat, ox, oy, oz, this);
        return rotateAroundGeneric(quat, ox, oy, oz, this);
    }
406698
public Quaternion fromVectors (IVector3 from, IVector3 to) {
        float angle = from.angle(to);
        if (angle < MathUtil.EPSILON) {
            return set(IDENTITY);
        }
        if (angle <= FloatMath.PI - MathUtil.EPSILON) {
            return fromAngleAxis(angle, from.cross(to).normalizeLocal());
        }
        // it's a 180 degree rotation; any axis orthogonal to the from vector will do
        Vector3 axis = new Vector3(0f, from.z(), -from.y());
        float length = axis.length();
        return fromAngleAxis(FloatMath.PI, length < MathUtil.EPSILON ?
                             axis.set(-from.z(), 0f, from.x()).normalizeLocal() :
                             axis.multLocal(1f / length));
    }
869238
public static Vector3d rotate(Vector3d vector, Vector3d axis, double angle) {
        Matrix3d rotate = new Matrix3d();
        rotate.set(new AxisAngle4d(axis.x, axis.y, axis.z, angle));
        Vector3d result = new Vector3d();
        rotate.transform(vector, result);
        return result;
    }
286701
public void rotate(double cos, double sin, Point2D rotationCenter) {
		Transformation2D temp = new Transformation2D();
		temp.setRotate(cos, sin, rotationCenter);
		multiply(temp);
	}
668539
public void rotate(Quaternion rotation) {
		Transform3D tr = new Transform3D();
		tr.setRotation(rotation);
		transform(tr);
	}
1235805
public void transform(Transform3D transform, Point3D pivot) {
		Point3D refPoint = (pivot == null) ? getPivot() : pivot;
		Vector3f v = new Vector3f(this.getEquationComponentA(),this.getEquationComponentB(),this.getEquationComponentC());
    	transform.transform(v);

    	// Update the plane equation according
    	// to the desired normal (computed from
    	// the identity vector and the rotations).
    	
    	// a.x + b.y + c.z + d = 0
    	// where (x,y,z) is the translation point
    	
    	
    	this.set(v.getX(),v.getY(),v.getZ(),- (this.getEquationComponentA()*(refPoint.getX()+transform.m03) +
    				this.getEquationComponentB()*(refPoint.getY()+transform.m13) +
    				this.getEquationComponentC()*(refPoint.getZ()+transform.m23)));
    	
		clearBufferedValues();
	}
717566
public static final void rotate(Structure structure,
			double[][] rotationmatrix) throws StructureException {

		if ( rotationmatrix.length != 3 ) {
			throw new StructureException ("matrix does not have size 3x3 !");
		}
		AtomIterator iter = new AtomIterator(structure) ;
		while (iter.hasNext()) {
			Atom atom = iter.next() ;
			Calc.rotate(atom,rotationmatrix);
		}
	}
279889
def transform(self, v3):
        
        if isinstance(v3, Vector3):
            t = super(Quaternion, self).transform([v3.x, v3.y, v3.z])
            return Vector3(t[0], t[1], t[2])
        elif len(v3) == 3:
            return super(Quaternion, self).transform(v3)
        else:
            raise TypeError("param v3 is not a vector type")
990393
public void rotate(float rx, float ry, float ang) {
		checkPush();

		predraw();
		translate(rx, ry);
		GL.glRotatef(ang, 0, 0, 1);
		translate(-rx, -ry);
		postdraw();
	}
399134
public void rotate(double angle)
    {
        final double x2 = x + width;
        final double y2 = y;

        final double x3 = x2;
        final double y3 = y + height;

        final double x4 = x;
        final double y4 = y3;

        final double cx = x + width / 2.0;
        final double cy = y + height / 2.0;

        final double a = UtilMath.wrapDouble(angle, 0, 360);
        final double cos = UtilMath.cos(a);
        final double sin = UtilMath.sin(a);

        final double rx1 = cos * (x - cx) - sin * (y - cy) + cx;
        final double ry1 = sin * (x - cx) + cos * (y - cy) + cy;

        final double rx2 = cos * (x2 - cx) - sin * (y2 - cy) + cx;
        final double ry2 = sin * (x2 - cx) + cos * (y2 - cy) + cy;

        final double rx3 = cos * (x3 - cx) - sin * (y3 - cy) + cx;
        final double ry3 = sin * (x3 - cx) + cos * (y3 - cy) + cy;

        final double rx4 = cos * (x4 - cx) - sin * (y4 - cy) + cx;
        final double ry4 = sin * (x4 - cx) + cos * (y4 - cy) + cy;

        final double nx1 = Math.min(Math.min(Math.min(rx1, rx2), rx3), rx4);
        final double ny1 = Math.max(Math.max(Math.max(ry1, ry2), ry3), ry4);

        final double nx2 = Math.max(Math.max(Math.max(rx1, rx2), rx3), rx4);

        final double ny3 = Math.min(Math.min(Math.min(ry1, ry2), ry3), ry4);

        x = nx1;
        y = ny3;
        width = nx2 - nx1;
        height = ny1 - ny3;
    }