ive made my own little parallax system (i find it easier to learn that way )

But i cant work out the maths.

I have a 200 width tile passing through a 100 width layout at 40 pixels a second, and this takes 2.5 seconds.

As youl see in the capx ive managed to get myself into numbers such as 0.828 seconds (when the speed is 60) .

Whats the maths behind this so i can easily calculate this when i need it .

Phew