You are here

public function Fraction::getNumerator in Fraction 2.x

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

Gets the numerator.

Return value

string Returns the numerator value.

Overrides FractionInterface::getNumerator

10 calls to Fraction::getNumerator()
Fraction::add in src/Fraction.php
Adds another fraction to this one.
Fraction::divide in src/Fraction.php
Divides this fraction by another one.
Fraction::gcd in src/Fraction.php
Calculate the fraction's greatest common divisor using Euclid's algorithm.
Fraction::multiply in src/Fraction.php
Multiplies this fraction with another one.
Fraction::reciprocate in src/Fraction.php
Reciprocates the fraction.

... See full list

File

src/Fraction.php, line 104

Class

Fraction
A simple class for representing and acting upon a fraction.

Namespace

Drupal\fraction

Code

public function getNumerator() {
  return $this->numerator;
}