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

Breadcrumb

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

function BigDecimal::toBigRational

Overrides BigNumber::toBigRational

File

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

Class

BigDecimal
Immutable, arbitrary-precision signed decimal numbers.

Namespace

Brick\Math

Code

public function toBigRational() : BigRational {
    $numerator = self::newBigInteger($this->value);
    $denominator = self::newBigInteger('1' . \str_repeat('0', $this->scale));
    return self::newBigRational($numerator, $denominator, false);
}

API Navigation

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