1
0
Fork 0

Update number/fractional.cc

Signed-off-by: subcrip <contact@subc.rip>
This commit is contained in:
subcrip 2024-11-28 10:23:42 +00:00
parent 129bce7a32
commit 560e2ea26d
1 changed files with 2 additions and 0 deletions

View File

@ -40,4 +40,6 @@ struct fractional {
x = l + fractional(r, divisor); x = l + fractional(r, divisor);
return in; return in;
} }
template <typename U, typename = typename enable_if<is_convertible_v<T, U>>::type>
inline U into(void) const { return U(p) / q; }
}; };