You are here

public function FractionInterface::fromDecimal in Fraction 8

Calculates the numerator and denominator from a decimal value.

Parameters

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

Return value

Fraction Returns this object.

Deprecated

in drupal:8.8.0 and is removed from drupal:9.0.0. Use the static \Drupal\fraction\Fraction::createFromDecimal() instead.

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

File

src/FractionInterface.php, line 90

Class

FractionInterface
Defines the interface for Fraction class.

Namespace

Drupal\fraction

Code

public function fromDecimal($value);