#pragma once /** * Common mathematical functions. */ namespace Math { template T Min(T a, T b) { return a < b ? a : b; } template T Max(T a, T b) { return a > b ? a : b; } template T Clamp(T low, T x, T high) { return Min(Max(low, x), high); } }