Low pass filter for accelerometer: code on github

I have ported an a low pass filter to reduce noise for the accelerometer taken from the iOS developer library to cocos2d-x. The port is trivial but I am posting it here in the hope it could save some time to somebody since this is a common need.
The github repo is here: low pass filter repo