I have an explosion which as closer as the object B are, more points will be earned.
I've established that every 5px closer, 1 point will be added and 200px is the explosions edge. So, in order to do an automatic comparison between these two objects, I came up with this:
Within 200px radius, I have 40 points (200/5 = 40 points)
I want to invert this, so I can get the right point measure. So, if I'm 5px close to the explosion, I get 40 points. If i'm 200px far, I get 1 point. If I'm 100px far, I get 20 points and so on
I'm not good with math so would be nice if someone could help me on that.