1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-02 04:29:14 +01:00
dxvk/src/util/util_math.h
2017-10-10 23:32:13 +02:00

12 lines
162 B
C++

#pragma once
namespace dxvk {
template<typename T>
T clamp(T n, T lo, T hi) {
if (n < lo) return lo;
if (n > hi) return hi;
return n;
}
}