You are here

public static function FractionInterface::createFromDecimal in Fraction 2.x

Same name and namespace in other branches
  1. 8 src/FractionInterface.php \Drupal\fraction\FractionInterface::createFromDecimal()

Calculates the numerator and denominator from a decimal value.

Parameters

string|int|float $value: The decimal value to start with.

Return value

Fraction Returns this object.

1 method overrides FractionInterface::createFromDecimal()
Fraction::createFromDecimal in src/Fraction.php
Calculates the numerator and denominator from a decimal value.

File

src/FractionInterface.php, line 87

Class

FractionInterface
Defines the interface for Fraction class.

Namespace

Drupal\fraction

Code

public static function createFromDecimal($value);