summaryrefslogtreecommitdiff
path: root/src/generic/random.t.hpp
blob: feea2b0ff6850b89e5403489d5d1aa9c0ab7348e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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