Jamoma API  0.6.0.a19

Limiting and Constraining Utilities. More...

#include <limits>
+ Include dependency graph for TTLimits.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Detailed Description

Limiting and Constraining Utilities.

Defines several functions for constraining values within specified boundaries and preventing unwanted values. A variety of behaviors are offered, including clipping, wrapping and folding. Functions for handling denormal values are also defined.

Exercise caution when using the functions defined here with unsigned values. Negative, signed integers have the potential to become very large numbers when casting to unsigned integers. This can cause errors during a boundary check, such as values clipping to the high boundary instead of the low boundary or numerous iterations of loop to bring a wrapped value back into the acceptable range.

Timothy Place & Tristan Matthews

Definition in file TTLimits.h.