Given a number (e.g. the x coordinate in px), and the max value it could be (e.g. the max width of it's container in px), returns it's position as a scaled percentage.
-----------| * |----------- | ^100px ^ 50px// returns 50 / 100 * scale or 50000 (50%) Copy
-----------| * |----------- | ^100px ^ 50px// returns 50 / 100 * scale or 50000 (50%)
Given a number (e.g. the x coordinate in px), and the max value it could be (e.g. the max width of it's container in px), returns it's position as a scaled percentage.