public function process()
    {
        $operands = $this->getOperands();

        if ($operands->containsNull() === true) {
            return null;
        }

        if ($operands->exclusivelySingle() === false) {
            $msg = "The Inside operator only accepts operands with a single cardinality.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_CARDINALITY);
        }

        if ($operands->exclusivelyPoint() === false) {
            $msg = "The Inside operator only accepts operands with a baseType of point.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_BASETYPE);
        }

        $operand = $operands[0];
        $coords = $this->getExpression()->getCoords();

        return new QtiBoolean($coords->inside($operand));
    }
public function process()
    {
        $operands = $this->getOperands();

        if ($operands->containsNull() === true) {
            return null;
        }

        if ($operands->exclusivelySingle() === false) {
            $msg = "The Inside operator only accepts operands with a single cardinality.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_CARDINALITY);
        }

        if ($operands->exclusivelyPoint() === false) {
            $msg = "The Inside operator only accepts operands with a baseType of point.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_BASETYPE);
        }

        $operand = $operands[0];
        $coords = $this->getExpression()->getCoords();

        return new QtiBoolean($coords->inside($operand));
    }
public function process ( ) { $ operands = $ this -> getOperands ( ) ; if ( $ operands -> containsNull ( ) === true ) { return null ; } if ( $ operands -> exclusivelySingle ( ) === false ) { $ msg = "The Inside operator only accepts operands with a single cardinality." ; throw new OperatorProcessingException ( $ msg , $ this , OperatorProcessingException :: WRONG_CARDINALITY ) ; } if ( $ operands -> exclusivelyPoint ( ) === false ) { $ msg = "The Inside operator only accepts operands with a baseType of point." ; throw new OperatorProcessingException ( $ msg , $ this , OperatorProcessingException :: WRONG_BASETYPE ) ; } $ operand = $ operands [ 0 ] ; $ coords = $ this -> getExpression ( ) -> getCoords ( ) ; return new QtiBoolean ( $ coords -> inside ( $ operand ) ) ; }
Process the Inside operator.

@return boolean|null Whether the given point is inside the area defined by shape and coords or NULL if the sub-expression is NULL.
@throws \qtism\runtime\expressions\operators\OperatorProcessingException
Process the Inside operator .