Sum

The sum of two compile-time rational numbers.

Members

Aliases

Sum
alias Sum = Rational!(((Lhs.numerator * Rhs.denominator) + (Rhs.numerator * Lhs.denominator)), cast(uint)(Lhs.denominator * Rhs.denominator))
Undocumented in source.

Examples

static assert(is(Sum!(Rational!(1, 3u), Rational!(1, 6u)) == Rational!(1, 2u)));
static assert(is(Sum!(Rational!2, Rational!1) == Rational!3));

Meta