Increment the stack pointer by one and set the values of the new current matrix to the one directly below it.

@return this
978623
public Matrix3fStack pushMatrix() {
        if (curr == mats.length) {
            throw new IllegalStateException("max stack size of " + (curr + 1) + " reached"); //$NON-NLS-1$ //$NON-NLS-2$
        }
        mats[curr++].set(this);
        return this;
    }
1149345
public Matrix4 setToRotation (IQuaternion quat) {
        float x = quat.x(), y = quat.y(), z = quat.z(), w = quat.w();
        float xx = x*x, yy = y*y, zz = z*z;
        float xy = x*y, xz = x*z, xw = x*w;
        float yz = y*z, yw = y*w, zw = z*w;
        return set(1f - 2f*(yy + zz), 2f*(xy - zw), 2f*(xz + yw), 0f,
                   2f*(xy + zw), 1f - 2f*(xx + zz), 2f*(yz - xw), 0f,
                   2f*(xz - yw), 2f*(yz + xw), 1f - 2f*(xx + yy), 0f,
                   0f, 0f, 0f, 1f);
    }
1056365
public Matrix3d set(double m[]) {
        m00 = m[0];
        m01 = m[1];
        m02 = m[2];
        m10 = m[3];
        m11 = m[4];
        m12 = m[5];
        m20 = m[6];
        m21 = m[7];
        m22 = m[8];
        return this;
    }
379948
public Matrix4f set(Vector4fc col0, Vector4fc col1, Vector4fc col2, Vector4fc col3) {
        if (col0 instanceof Vector4f &&
            col1 instanceof Vector4f &&
            col2 instanceof Vector4f &&
            col3 instanceof Vector4f) {
            MemUtil.INSTANCE.set(this, (Vector4f) col0, (Vector4f) col1, (Vector4f) col2, (Vector4f) col3);
        } else {
            setVector4fc(col0, col1, col2, col3);
        }
        _properties(0);
        return this;
    }
107965
private boolean setNextIterator()
    {
        boolean retval = false;
        // first, check if the activeIterator is null, and set it.
        if (m_activeIterator == null)
        {
            if (m_rsIterators.size() > 0)
            {
                m_activeIteratorIndex = 0;
                m_currentCursorPosition = 0;
                m_activeIterator = (OJBIterator) m_rsIterators.get(m_activeIteratorIndex);
            }
        }
        else if (!m_activeIterator.hasNext())
        {
            if (m_rsIterators.size() > (m_activeIteratorIndex + 1))
            {
                // we still have iterators in the collection, move to the
                // next one, increment the counter, and set the active
                // iterator.
                m_activeIteratorIndex++;
                m_currentCursorPosition = 0;
                m_activeIterator = (OJBIterator) m_rsIterators.get(m_activeIteratorIndex);
                retval = true;
            }
        }

        return retval;
    }
1243667
public Matrix4x3f set(Matrix4fc m) {
        if (m instanceof Matrix4f) {
            MemUtil.INSTANCE.copy((Matrix4f) m, this);
        } else {
            setMatrix4fc(m);
        }
        properties = m.properties() & (PROPERTY_IDENTITY | PROPERTY_TRANSLATION | PROPERTY_ORTHONORMAL);
        return this;
    }
141028
public Matrix add(double c)
    {
        Matrix toReturn = getThisSideMatrix(null);
        toReturn.mutableAdd(c);
        return toReturn;
    }
305271
public Matrix3x2fStack pushMatrix() {
        if (curr == mats.length) {
            throw new IllegalStateException("max stack size of " + (curr + 1) + " reached"); //$NON-NLS-1$ //$NON-NLS-2$
        }
        mats[curr++].set(this);
        return this;
    }
622985
public static function incrementStep()
    {
        if (self::isLastStep()) {
            return;
        }
        $next = self::classNameNumber() + 1;
        if ($next == 1) {
            $next++;
        }
        return self::setCurrentStep($next);
    }
142215
function(){
            var newArray = new Array2d(this.width, this.height);
            for(var x = this.width - 1; x >= 0; x--){
                for(var y = this.height - 1; y >= 0; y--){
                    var val = this.get(x, y);
                    if(val !== void 0){
                        newArray.set(x, y, val);
                    }
                }
            }
            return newArray;
        }
681096
public Matrix3f set(Matrix4fc mat) {
        if (mat instanceof Matrix4f) {
            MemUtil.INSTANCE.copy((Matrix4f) mat, this);
        } else {
            setMatrix4fc(mat);
        }
        return this;
    }
971988
public static MatrixAccumulator mkMaxAccumulator() {
        return new MatrixAccumulator() {
            private double result = Double.NEGATIVE_INFINITY;

            @Override
            public void update(int i, int j, double value) {
                result = Math.max(result, value);
            }

            @Override
            public double accumulate() {
                double value = result;
                result = Double.NEGATIVE_INFINITY;
                return value;
            }
        };
    }
1139071
public Matrix4 set (IMatrix4 other) {
        return set(other.m00(), other.m10(), other.m20(), other.m30(),
                   other.m01(), other.m11(), other.m21(), other.m31(),
                   other.m02(), other.m12(), other.m22(), other.m32(),
                   other.m03(), other.m13(), other.m23(), other.m33());
    }
319942
public IMatrix mul(IMatrix b) {
        IMatrix result = new IMatrix(rows, columns);
        mul(b, result);
        return result;
    }
38665
public ByteBuffer append_i(int b) {
        int newcount = count + 1;
        if (newcount > buf.length) {
            byte newbuf[] = new byte[Math.max(buf.length << 1, newcount)];
            System.arraycopy(buf, 0, newbuf, 0, count);
            buf = newbuf;
        }
        buf[count] = (byte)b;
        count = newcount;
        return this;
    }
880920
public Matrix copy()
    {
        Matrix X = new Matrix(m, n);
        double[][] C = X.getArray();
        for (int i = 0; i < m; i++)
        {
            for (int j = 0; j < n; j++)
            {
                C[i][j] = A[i][j];
            }
        }
        return X;
    }
1248419
public Matrix plus(Matrix B) {
        Matrix A = this;
        if (B.M != A.M || B.N != A.N) {
            throw new RuntimeException("Illegal matrix dimensions.");
        }
        Matrix C = new Matrix(M, N);
        for (int i = 0; i < M; i++) {
            for (int j = 0; j < N; j++) {
                C.data[i][j] = A.data[i][j] + B.data[i][j];
            }
        }
        return C;
    }