xo-ratio: allow construction from numerator-only

This commit is contained in:
Roland Conybeare 2024-04-27 11:53:37 -04:00
commit 781f393f91

View file

@ -53,7 +53,7 @@ namespace xo {
*
* Ratio need not be normalized
**/
constexpr ratio(Int n, Int d) : num_{n}, den_{d} {}
constexpr ratio(Int n, Int d = 1) : num_{n}, den_{d} {}
///@}
/** @defgroup ratio-static-methods **/