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

Breadcrumb

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

RoundingMode::HALF_UP

Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round up.

Behaves as for UP if the discarded fraction is >= 0.5; otherwise, behaves as for DOWN. Note that this is the rounding mode commonly taught at school.

File

vendor/ramsey/uuid/src/Math/RoundingMode.php, line 104

Class

RoundingMode
Specifies a rounding behavior for numerical operations capable of discarding precision.

Namespace

Ramsey\Uuid\Math

Code

public const HALF_UP = 5;

API Navigation

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