Input bind complete.
This commit is contained in:
@@ -14,4 +14,32 @@
|
||||
* @param value The value to find the next power of two for.
|
||||
* @return The next power of two greater than or equal to the value.
|
||||
*/
|
||||
uint32_t mathNextPowTwo(uint32_t value);
|
||||
uint32_t mathNextPowTwo(uint32_t value);
|
||||
|
||||
/**
|
||||
* Returns the maximum of two values.
|
||||
*
|
||||
* @param a The first value.
|
||||
* @param b The second value.
|
||||
* @return The maximum of the two values.
|
||||
*/
|
||||
#define mathMax(a, b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
/**
|
||||
* Returns the minimum of two values.
|
||||
*
|
||||
* @param a The first value.
|
||||
* @param b The second value.
|
||||
* @return The minimum of the two values.
|
||||
*/
|
||||
#define mathMin(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
/**
|
||||
* Clamps a value between a lower and upper bound.
|
||||
*
|
||||
* @param x The value to clamp.
|
||||
* @param lower The lower bound.
|
||||
* @param upper The upper bound.
|
||||
* @return The clamped value.
|
||||
*/
|
||||
#define mathClamp(x, lower, upper) (mathMin(upper, mathMax(lower, x)))
|
||||
Reference in New Issue
Block a user