From dd5504352776d5a58315e3ac3d69fa96eab1e9e2 Mon Sep 17 00:00:00 2001 From: James Fulop Date: Sat, 17 Sep 2016 19:01:43 -0400 Subject: [PATCH] add lerp macro --- renderdoc/common/common.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/renderdoc/common/common.h b/renderdoc/common/common.h index 6951f95cf..ac9dfa531 100644 --- a/renderdoc/common/common.h +++ b/renderdoc/common/common.h @@ -121,6 +121,12 @@ T RDCMAX(const T &a, const T &b) return a > b ? a : b; } +template +T RDCLERP(const T &a, const T &b, const T &step) +{ + return (1.0f - step) * a + step * b; +} + template inline T AlignUp4(T x) {