Ignore:
Timestamp:
Aug 29, 2012, 10:27:53 PM (9 years ago)
Author:
touky
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/numeric.h

    r1513 r1833  
    5353}
    5454
     55//Lerp for float
     56template <typename T1, typename T2, typename Tf> static inline T1 damp(const T1 &a, const T2 &b, const Tf &x, const Tf &dt)
     57{
     58        if (dt <= .0f)
     59                return a;
     60    return lol::lerp(a, b, dt / (dt + x));
     61}
     62
    5563} /* namespace lol */
    5664
Note: See TracChangeset for help on using the changeset viewer.