public function Fraction::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.
Overrides FractionInterface::fromDecimal
Deprecated
in drupal:8.8.0 and is removed from drupal:9.0.0. Use the static \Drupal\fraction\Fraction::createFromDecimal() instead.
File
- src/
Fraction.php, line 40
Class
- Fraction
- A simple class for representing and acting upon a fraction.
Namespace
Drupal\fractionCode
public function fromDecimal($value) {
@trigger_error(__METHOD__ . ' is deprecated in drupal:8.0.0 and is removed in drupal:9.0.0. Use the static \\Drupal\\fraction\\Fraction::createFromDecimal() instead.', E_USER_DEPRECATED);
return self::createFromDecimal($value);
}