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

Breadcrumb

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

function Rectangle::delta

Returns the difference of a fraction from the closest between 0 and 1.

Parameters

float $input: The input value.

Return value

float the difference of a fraction from the closest between 0 and 1.

1 call to Rectangle::delta()
Rectangle::fixImprecision in core/lib/Drupal/Component/Utility/Rectangle.php
Performs an imprecision check on the input value and fixes it if needed.

File

core/lib/Drupal/Component/Utility/Rectangle.php, line 170

Class

Rectangle
Rectangle rotation algebra class.

Namespace

Drupal\Component\Utility

Code

protected function delta($input) {
    $fraction = $this->fraction($input);
    return $fraction > 0.5 ? 1 - $fraction : $fraction;
}

API Navigation

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