| 21 | static inline float mix(float a, float b, float factor) { return a * (1.0f - factor) + b * factor; } |
| 22 | |
| 23 | template <typename T> static inline T clamp(const T &v, const T &min, const T &max) |
| 24 | { |
| 25 | if (v < min) |
| 26 | return min; |
| 27 | if (v > max) |
| 28 | return max; |
| 29 | return v; |
| 30 | } |
| 31 | |
| 32 | } // namespace OpenApoc |
| 33 |
no outgoing calls
no test coverage detected