protected function doTransform(Matrix $mA, $extra = null)
    {
        if (is_null($extra)) {
            throw new TransformationException('Reflection plane not specified');
        } else {
            if (!array_key_exists($extra, $this->reflectionMatrices)) {
                throw new TransformationException('Reflection plane not supported');
            }
        }

        //simple cases
        if ($mA->is('empty') || $mA->is('singleitem')) {
            return clone $mA;
        }

        $this->assertMatrixIsComplete($mA);

        return $this->reflect($mA, $this->reflectionMatrices[$extra]);
    }
protected function doTransform(Matrix $mA, $extra = null)
    {
        if (is_null($extra)) {
            throw new TransformationException('Reflection plane not specified');
        } else {
            if (!array_key_exists($extra, $this->reflectionMatrices)) {
                throw new TransformationException('Reflection plane not supported');
            }
        }

        //simple cases
        if ($mA->is('empty') || $mA->is('singleitem')) {
            return clone $mA;
        }

        $this->assertMatrixIsComplete($mA);

        return $this->reflect($mA, $this->reflectionMatrices[$extra]);
    }
protected function doTransform ( Matrix $ mA , $ extra = null ) { if ( is_null ( $ extra ) ) { throw new TransformationException ( 'Reflection plane not specified' ) ; } else { if ( ! array_key_exists ( $ extra , $ this -> reflectionMatrices ) ) { throw new TransformationException ( 'Reflection plane not supported' ) ; } } //simple cases if ( $ mA -> is ( 'empty' ) || $ mA -> is ( 'singleitem' ) ) { return clone $ mA ; } $ this -> assertMatrixIsComplete ( $ mA ) ; return $ this -> reflect ( $ mA , $ this -> reflectionMatrices [ $ extra ] ) ; }
Reflect the matrix on a plane

@param Matrix $mA First matrix operand - required
@param int $extra Reflection plane - required

@return Matrix

@throws \Chippyash\Matrix\Exceptions\TransformationException
Reflect the matrix on a plane