Adaptation of std::ratio
for Hana.
Comparable
std::ratio
s are compared for equality using std::ratio_equal
. Orderable
std::ratio
s are ordered using std::ratio_less
. Monoid
, Group
, Ring
, and EuclideanRing
std::ratio
s are added, subtracted, multiplied and divided using std::ratio_add
, std::ratio_subtract
, std::ratio_multiply
and std::ratio_divide
, respectively. Furthermore, the neutral element for the additive operation is std::ratio<0, 1>{}
, and the neutral element for the multiplicative operation is std::ratio<1, 1>{}
.