/* * Clamp.h * * Created on: May 7, 2013 * Author: chibi_000 */ #ifndef CLAMP_H_ #define CLAMP_H_ #include template A clamp (A value, B minimum, C maximum) { return std::min( std::max(value, minimum) , maximum); } #endif /* CLAMP_H_ */