interchanged a conflict for C++ portability against C
more info detailed on the divide table
inline function method to maintain clamping functions