distance between rects
Depends on your definition of this "distance" and whether your rectangles can be rotated or not.
A quick way is simply calculating the distance between their centres. This distance will stay the same even for arbitrary oriented rects.
A quick way is simply calculating the distance between their centres. This distance will stay the same even for arbitrary oriented rects.
Quote:Original post by darookie
A quick way is simply calculating the distance between their centres. This distance will stay the same even for arbitrary oriented rects.
You can use the pythagorean theorem to do this.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement