public function Fraction::__construct in Fraction 8
Same name and namespace in other branches
- 2.x src/Fraction.php \Drupal\fraction\Fraction::__construct()
Constructs a Fraction object.
Parameters
string|int $numerator: The fraction's numerator. Defaults to 0.
string|int $denominator: The fraction's denominator. Defaults to 1.
File
- src/
Fraction.php, line 32
Class
- Fraction
- A simple class for representing and acting upon a fraction.
Namespace
Drupal\fractionCode
public function __construct($numerator = 0, $denominator = 1) {
$this
->setNumerator($numerator);
$this
->setDenominator($denominator);
}