operator % method

  1. @override
XPathNumeric operator %(
  1. XPathNumeric other
)
override

Implementation

@override
XPathNumeric operator %(XPathNumeric other) {
  final otherD = other.toDouble();
  if (otherD == 0.0) {
    throw XPathEvaluationException(
      XPathErrorCode.FOAR0001,
      'Division by zero in mod',
    );
  }
  return XPathDouble(value.remainder(otherD));
}