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

Breadcrumb

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

function BigInteger::one

Returns a BigInteger representing one.

@psalm-pure

6 calls to BigInteger::one()
BigInteger::power in vendor/brick/math/src/BigInteger.php
Returns this number exponentiated to the given value.
BigInteger::toBigRational in vendor/brick/math/src/BigInteger.php
Converts this number to a BigRational.
BigRational::one in vendor/brick/math/src/BigRational.php
Returns a BigRational representing one.
BigRational::power in vendor/brick/math/src/BigRational.php
Returns this number exponentiated to the given value.
BigRational::ten in vendor/brick/math/src/BigRational.php
Returns a BigRational representing ten.

... See full list

File

vendor/brick/math/src/BigInteger.php, line 307

Class

BigInteger
An arbitrary-size integer.

Namespace

Brick\Math

Code

public static function one() : BigInteger {
    
    /**
     * @psalm-suppress ImpureStaticVariable
     * @var BigInteger|null $one
     */
    static $one;
    if ($one === null) {
        $one = new BigInteger('1');
    }
    return $one;
}

API Navigation

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