diff options
Diffstat (limited to 'src/generic/random.t.hpp')
-rw-r--r-- | src/generic/random.t.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/generic/random.t.hpp b/src/generic/random.t.hpp new file mode 100644 index 0000000..feea2b0 --- /dev/null +++ b/src/generic/random.t.hpp @@ -0,0 +1,23 @@ +#ifndef TMWA_GENERIC_RANDOM_T_HPP +#define TMWA_GENERIC_RANDOM_T_HPP + +namespace random_ +{ + struct Fraction + { + int num, den; + }; + + template<class T, T den> + struct Fixed + { + T num; + + operator Fraction() + { + return {num, den}; + } + }; +} // namespace random_ + +#endif // TMWA_GENERIC_RANDOM_T_HPP |