The reason you were given for closing the question is terrible ("lacks sufficient information", what?), but you were basically asking a simple math question on a programming site.
This is the trouble with being too specific. It's often better to say: here's what I want to do and why, what's the best way to accomplish that? Describe your actual problem first, before getting into your attempted solution.