So, I have 3 Variables
Amount = Number of frames
SizeX = The Size X Scale of the frame
Bounds = since we are using Scale and not offset this will be one
My equation Calculates the X position that the frame needs to be in according to the Amount of frames and the Size of the frame. What I want to know if this is the correct equation:
(Bounds - SizeX * Amount) / (Amount + Bounds)
Examples;
Amount = 1, Size = .125
Amount = 5, Size = .125
Amount = 8, Size = .125
It works! It gets the perfect gap distances needed to fill in the UI. But I want to know if this is the best way of calculating the X position, are there shorter more efficient ways or is the right equation to get the X position.
Can anybody tell me or help?