57 DEFAULT, |
62 DEFAULT, |
58 |
63 |
59 NUM_COLORS |
64 NUM_COLORS |
60 }; |
65 }; |
61 |
66 |
62 template<typename Signature> |
67 // ------------------------------------------------------------------------------------------------- |
63 using Function = std::function<Signature>; |
68 // |
64 |
|
65 FUNCTION print_to_console (String a) -> void; |
69 FUNCTION print_to_console (String a) -> void; |
66 |
70 |
|
71 // ------------------------------------------------------------------------------------------------- |
|
72 // |
67 template<typename T> inline FUNCTION |
73 template<typename T> inline FUNCTION |
68 clamp (T a, T b, T c) -> T |
74 clamp (T a, T b, T c) -> T |
69 { |
75 { |
70 return (a < b) ? b : (a > c) ? c : a; |
76 return (a < b) ? b : (a > c) ? c : a; |
71 } |
77 } |
72 |
78 |
|
79 // ------------------------------------------------------------------------------------------------- |
|
80 // |
73 struct Exitception {}; |
81 struct Exitception {}; |