public function Fraction::__construct in Fraction 7
Constructor.
Parameters
$numerator: The fraction's numerator.
$denominator: The fraction's denominator.
File
- ./
fraction.class.inc, line 24 - Fraction class
Class
- Fraction
- @file Fraction class
Code
public function __construct($numerator, $denominator) {
// Set the numerator and denominator.
$this
->setNumerator($numerator);
$this
->setDenominator($denominator);
}