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

Breadcrumb

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

function BigDecimal::valueWithMinScale

4 calls to BigDecimal::valueWithMinScale()
BigDecimal::dividedBy in vendor/brick/math/src/BigDecimal.php
Returns the result of the division of this number by the given one, at the given scale.
BigDecimal::quotient in vendor/brick/math/src/BigDecimal.php
Returns the quotient of the division of this number by the given one.
BigDecimal::quotientAndRemainder in vendor/brick/math/src/BigDecimal.php
Returns the quotient and remainder of the division of this number by the given one.
BigDecimal::remainder in vendor/brick/math/src/BigDecimal.php
Returns the remainder of the division of this number by the given one.

File

vendor/brick/math/src/BigDecimal.php, line 713

Class

BigDecimal
Immutable, arbitrary-precision signed decimal numbers.

Namespace

Brick\Math

Code

private function valueWithMinScale(int $scale) : string {
    $value = $this->value;
    if ($this->value !== '0' && $scale > $this->scale) {
        $value .= \str_repeat('0', $scale - $this->scale);
    }
    return $value;
}

API Navigation

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