Added code

This commit is contained in:
2018-02-06 01:44:42 +02:00
parent 16996e538a
commit d70c0ccf20
120 changed files with 25302 additions and 0 deletions

20
Utils/Clamp.h Normal file
View File

@ -0,0 +1,20 @@
/*
* Clamp.h
*
* Created on: May 7, 2013
* Author: chibi_000
*/
#ifndef CLAMP_H_
#define CLAMP_H_
#include <algorithm>
template <typename A, typename B, typename C>
A clamp (A value, B minimum, C maximum)
{
return std::min( std::max(value, minimum) , maximum);
}
#endif /* CLAMP_H_ */