Browse Source

Small fix in template lerp

legacy
Benjamin ‘Touky’ Huet touky 12 years ago
parent
commit
b273f1729e
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/lol/math/vector.h
  2. +1
    -1
      src/numeric.h

+ 1
- 1
src/lol/math/vector.h View File

@@ -1286,7 +1286,7 @@ extern Quat<T> slerp(Quat<T> const &qa, Quat<T> const &qb, T f);
{ \ { \
tname<tf> ret; \ tname<tf> ret; \
for (size_t n = 0; n < sizeof(a) / sizeof(t1); n++) \ for (size_t n = 0; n < sizeof(a) / sizeof(t1); n++) \
ret[n] = a[n] + (a[n] - b[n]) * x; \
ret[n] = a[n] + (b[n] - a[n]) * x; \
return ret; \ return ret; \
} }




+ 1
- 1
src/numeric.h View File

@@ -52,7 +52,7 @@ template <typename T> static inline T PotUp(T val)
return val + 1; return val + 1;
} }


//Lerp for float
//Damp for float
template <typename T1, typename T2, typename Tf> static inline T1 damp(const T1 &a, const T2 &b, const Tf &x, const Tf &dt) template <typename T1, typename T2, typename Tf> static inline T1 damp(const T1 &a, const T2 &b, const Tf &x, const Tf &dt)
{ {
if (dt <= .0f) if (dt <= .0f)


Loading…
Cancel
Save