Linear Slider Centroid Algorithm .c/.h Source Code

When implement a linear slider use several independent buttons, i separated the centroid algorithm provided by CapSense component into separate .c/.h source file, may be useful to someone who wants this code.