I know this is probably the noob-est of questions, but I'm trying to calculate the relative distance between 2 sprites, and I know the formula is basically:
distance(sprite1.x,sprite1.y,sprite2.x,sprite2.y)
....but I haven't figured out where this code goes. I've not been able to find any examples of how it's implemented. If someone could show me an example, I'd be grateful.