Difference

The difference between two compile-time rational numbers.

Members

Aliases

Difference
alias Difference = Rational!(((Lhs.numerator * Rhs.denominator) - (Rhs.numerator * Lhs.denominator)), Lhs.denominator * Rhs.denominator)
Undocumented in source.

Examples

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

Meta