diff --git a/inc/hgl/math/Vector.h b/inc/hgl/math/Vector.h index 4c3db8d..c4d13ed 100644 --- a/inc/hgl/math/Vector.h +++ b/inc/hgl/math/Vector.h @@ -115,6 +115,16 @@ namespace hgl return clamp(in,0.0f,1.0f); } + template<> inline const uint8 clamp(const uint8 in) + { + return clamp(in,0,0xFF); + } + + template<> inline const uint16 clamp(const uint16 in) + { + return clamp(in,0,0xFFFF); + } + template inline T normalized(const T &v) {