A fraction (i.e. a thing with an integer numerator and an integer denominator).
More...
#include <types.h>
|
int | numerator = 0 |
|
int | denominator = 0 |
|
A fraction (i.e. a thing with an integer numerator and an integer denominator).
Definition at line 213 of file types.h.
◆ Fraction() [1/3]
dcp::Fraction::Fraction |
( |
| ) |
|
|
inline |
Construct a fraction of 0/0
Definition at line 217 of file types.h.
◆ Fraction() [2/3]
Fraction::Fraction |
( |
std::string |
s | ) |
|
|
explicit |
Construct a Fraction from a string of the form <numerator> <denominator> e.g. "1 3".
Definition at line 79 of file types.cc.
◆ Fraction() [3/3]
dcp::Fraction::Fraction |
( |
int |
n, |
|
|
int |
d |
|
) |
| |
|
inline |
Construct a fraction with a specified numerator and denominator.
- Parameters
-
n | Numerator. |
d | Denominator. |
Definition at line 223 of file types.h.
The documentation for this class was generated from the following files: