diff options
Diffstat (limited to 'Runtime/Math/MathHelper.h')
-rw-r--r-- | Runtime/Math/MathHelper.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Runtime/Math/MathHelper.h b/Runtime/Math/MathHelper.h new file mode 100644 index 0000000..3f8754a --- /dev/null +++ b/Runtime/Math/MathHelper.h @@ -0,0 +1,11 @@ +#pragma once + +#define max(a, b)\ +(a)>(b)?(a):(b) + +#define min(a, b)\ +(a)<(b)?(a):(b) + +#define clamp(v, lo, hi)\ +max((lo), min((v), (hi))) + |