I made a simple module that lets you make a sliding average within a certain limit.
sliding.lua snippet
I made it to be able to average the number of clicks/button presses in a window of a certain number of seconds.
So every time in your update() step, you save the number of clicks that happened since your last update.
I'm still not very confident that this is a good solution. Could someone take a look and see if I'm doing anything stupid, or if there's a more elegant solution?
Sliding Average snippet
-
- Prole
- Posts: 31
- Joined: Thu Sep 13, 2012 2:10 am
Who is online
Users browsing this forum: No registered users and 3 guests