pocketmine\math\Matrix::substract PHP Метод

substract() публичный Метод

public substract ( Matrix $matrix )
$matrix Matrix
    public function substract(Matrix $matrix)
    {
        if ($this->rows !== $matrix->getRows() or $this->columns !== $matrix->getColumns()) {
            return false;
        }
        $result = clone $this;
        for ($r = 0; $r < $this->rows; ++$r) {
            for ($c = 0; $c < $this->columns; ++$c) {
                $result->setElement($r, $c, $this->matrix[$r][$c] - $matrix->getElement($r, $c));
            }
        }
        return $result;
    }