From 781f393f91a10759a3bb685b1a96a483cc9bf0da Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sat, 27 Apr 2024 11:53:37 -0400 Subject: [PATCH] xo-ratio: allow construction from numerator-only --- include/xo/ratio/ratio.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/xo/ratio/ratio.hpp b/include/xo/ratio/ratio.hpp index 36087e7e..5496e05e 100644 --- a/include/xo/ratio/ratio.hpp +++ b/include/xo/ratio/ratio.hpp @@ -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 **/