summaryrefslogtreecommitdiff
path: root/src/common/random.t.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/random.t.hpp')
-rw-r--r--src/common/random.t.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/common/random.t.hpp b/src/common/random.t.hpp
new file mode 100644
index 0000000..98a6c59
--- /dev/null
+++ b/src/common/random.t.hpp
@@ -0,0 +1,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