public Matrix4f rotateX(float ang, Matrix4f dest) {
        if ((properties & PROPERTY_IDENTITY) != 0)
            return dest.rotationX(ang);
        float sin, cos;
        sin = (float) Math.sin(ang);
        cos = (float) Math.cosFromSin(sin, ang);
        float rm11 = cos;
        float rm12 = sin;
        float rm21 = -sin;
        float rm22 = cos;

        // add temporaries for dependent values
        float nm10 = m10 * rm11 + m20 * rm12;
        float nm11 = m11 * rm11 + m21 * rm12;
        float nm12 = m12 * rm11 + m22 * rm12;
        float nm13 = m13 * rm11 + m23 * rm12;
        // set non-dependent values directly
        dest._m20(m10 * rm21 + m20 * rm22);
        dest._m21(m11 * rm21 + m21 * rm22);
        dest._m22(m12 * rm21 + m22 * rm22);
        dest._m23(m13 * rm21 + m23 * rm22);
        // set other values
        dest._m10(nm10);
        dest._m11(nm11);
        dest._m12(nm12);
        dest._m13(nm13);
        dest._m00(m00);
        dest._m01(m01);
        dest._m02(m02);
        dest._m03(m03);
        dest._m30(m30);
        dest._m31(m31);
        dest._m32(m32);
        dest._m33(m33);
        dest._properties(properties & ~(PROPERTY_PERSPECTIVE | PROPERTY_IDENTITY | PROPERTY_TRANSLATION));
        return dest;
    }
public Matrix4f rotateX ( float ang , Matrix4f dest ) { if ( ( properties & PROPERTY_IDENTITY ) != 0 ) return dest . rotationX ( ang ) ; float sin , cos ; sin = ( float ) Math . sin ( ang ) ; cos = ( float ) Math . cosFromSin ( sin , ang ) ; float rm11 = cos ; float rm12 = sin ; float rm21 = - sin ; float rm22 = cos ; float nm10 = m10 * rm11 + m20 * rm12 ; float nm11 = m11 * rm11 + m21 * rm12 ; float nm12 = m12 * rm11 + m22 * rm12 ; float nm13 = m13 * rm11 + m23 * rm12 ; dest . _m20 ( m10 * rm21 + m20 * rm22 ) ; dest . _m21 ( m11 * rm21 + m21 * rm22 ) ; dest . _m22 ( m12 * rm21 + m22 * rm22 ) ; dest . _m23 ( m13 * rm21 + m23 * rm22 ) ; dest . _m10 ( nm10 ) ; dest . _m11 ( nm11 ) ; dest . _m12 ( nm12 ) ; dest . _m13 ( nm13 ) ; dest . _m00 ( m00 ) ; dest . _m01 ( m01 ) ; dest . _m02 ( m02 ) ; dest . _m03 ( m03 ) ; dest . _m30 ( m30 ) ; dest . _m31 ( m31 ) ; dest . _m32 ( m32 ) ; dest . _m33 ( m33 ) ; dest . _properties ( properties & ~ ( PROPERTY_PERSPECTIVE | PROPERTY_IDENTITY | PROPERTY_TRANSLATION ) ) ; return dest ; }
/* (non-Javadoc)
@see org.joml.Matrix4fc#rotateX(float, org.joml.Matrix4f)