[mathlib] Add Blend macro

The Blend macro supports any non-integral type supporting * and +
(float, double, vec4f_t, etc), so it is essentially a scalar VectorBlend
or QuatBlend.
This commit is contained in:
Bill Currie 2021-04-25 15:02:30 +09:00
parent e6bc5e3e11
commit 8b6136e6f5

View file

@ -57,6 +57,8 @@ extern int nanmask;
#define IS_NAN(x) (((*(int *) (char *) &x) & nanmask) == nanmask)
#define Blend(a,b,blend) ((1 - (blend)) * (a) + (blend) * (b))
#include "QF/math/vector.h"
#include "QF/math/quaternion.h"
#include "QF/math/dual.h"