Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BrickMathCalculator.php

function BrickMathCalculator::subtract

Overrides CalculatorInterface::subtract

File

vendor/ramsey/uuid/src/Math/BrickMathCalculator.php, line 58

Class

BrickMathCalculator
A calculator using the brick/math library for arbitrary-precision arithmetic

Namespace

Ramsey\Uuid\Math

Code

public function subtract(NumberInterface $minuend, NumberInterface ...$subtrahends) : NumberInterface {
    $difference = BigInteger::of($minuend->toString());
    foreach ($subtrahends as $subtrahend) {
        $difference = $difference->minus($subtrahend->toString());
    }
    return new IntegerObject((string) $difference);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal