Advertisement
Guest User

Untitled

a guest
Sep 16th, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.12 KB | None | 0 0
  1. double ewma(double avg, double sample, double weight)
  2. {
  3. return avg==0 ? sample : weight*avg+(1.0-weight)*sample;
  4. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement