util.h 156 B

1234567
  1. #pragma once
  2. template <typename T> T CLAMP(const T& value, const T& low, const T& high)
  3. {
  4. return value < low ? low : (value > high ? high : value);
  5. }