Rational.h
Go to the documentation of this file.
11 * Where calculations all involve constant values use std::ratio to have computations performed at compile time.
126 template <typename ValueType> friend ValueType operator*(const Ratio& lhs, const ValueType& rhs)
ValType muldiv(const ValType &value, const NumDenType &num, const NumDenType &den)
Perform muldiv using unsigned integer types.
Definition: muldiv.h:110
friend Ratio operator/(Ratio lhs, const ValueType &rhs)
Evaluate value = Ratio / value
Definition: Rational.h:142
friend Ratio operator/(const Ratio &lhs, const Ratio &rhs)
Evaluate ratio = ratio1 / ratio2 and minimise.
Definition: Rational.h:134
Ratio()=default
friend ValueType operator*(const Ratio &lhs, const ValueType &rhs)
Evaluate value = ratio * value
Definition: Rational.h:126
friend Ratio operator*(const Ratio &lhs, const Ratio &rhs)
Evaluate ratio = ratio1 * ratio2 and minimise.
Definition: Rational.h:110
friend ValueType operator/(ValueType lhs, const Ratio &rhs)
Evaluate value = value / ratio
Definition: Rational.h:150
friend ValueType operator*(ValueType lhs, const Ratio &rhs)
Evaluate value = value * ratio
Definition: Rational.h:118