blob: 98a6c59b045bfeff8d2dea4c1ad21f44253518f9 (
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 RANDOM_T_HPP
#define 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 // RANDOM_T_HPP
|