Time to lerp!
unlerp(340, 480, Sprite.Y) will return 0 if sprite.y is 340,1 if sprite.y is 480, and interpolates with a affine function between those values (0.5 will be for sprite.y of 410)
lerp(0.8, 1, A) will return 0.8 for A =0, 1 for A =1, and interpolate with an affine function between.
combined with lerp, you can do:
lerp(0.8, 1,unlerp(340, 480, Sprite.Y)), which should return 0.8 for sprite.y being 340, 1 for sprite.y being 480, 0.9 for sprite.y being 410.
hope I am correct