function Rectangle::fraction
Same name in other branches
- 9 core/lib/Drupal/Component/Utility/Rectangle.php \Drupal\Component\Utility\Rectangle::fraction()
- 8.9.x core/lib/Drupal/Component/Utility/Rectangle.php \Drupal\Component\Utility\Rectangle::fraction()
- 10 core/lib/Drupal/Component/Utility/Rectangle.php \Drupal\Component\Utility\Rectangle::fraction()
Returns the fractional part of a float number, unsigned.
Parameters
float $input: The input value.
Return value
float The fractional part of the input number, unsigned.
1 call to Rectangle::fraction()
- Rectangle::delta in core/
lib/ Drupal/ Component/ Utility/ Rectangle.php - Returns the difference of a fraction from the closest between 0 and 1.
File
-
core/
lib/ Drupal/ Component/ Utility/ Rectangle.php, line 157
Class
- Rectangle
- Rectangle rotation algebra class.
Namespace
Drupal\Component\UtilityCode
protected function fraction($input) {
return abs((int) $input - $input);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.