#ifndef TOOLS_H_ #define TOOLS_H_ #define cut_bounds(x, min, max) ( ((x) < (min)) ? (min) : ((x) > (max)) ? (max) : (x) ) #endif