A compile-time ratio of two integers, automatically reduced to lowest terms.
More...
|
| using | type = ratio<num, den> |
| | The type of an equivalent ratio whose reduced numerator and denominator are the same as this ratio.
|
| |
|
| static constexpr intmax_t | den {::arene::base::abs(D) / gcd} |
| | The denominator of the ratio, reduced to lowest terms.
|
| |
| static constexpr intmax_t | num {d_sign * N / gcd} |
| | The numerator of the ratio, reduced to lowest terms.
|
| |
A compile-time ratio of two integers, automatically reduced to lowest terms.
- Template Parameters
-
| N | The unreduced numerator of the ratio |
| D | The unreduced denominator of the ratio |
- Precondition
- The denominator must not be 0, and both numerator and denominator must have representable absolute values
◆ type
The type of an equivalent ratio whose reduced numerator and denominator are the same as this ratio.
◆ den
The denominator of the ratio, reduced to lowest terms.
◆ num
The numerator of the ratio, reduced to lowest terms.
The documentation for this class was generated from the following file: