 So now that we've done the distance formula, let's find a practical application for this mathematical equation. And one such way is through collision detection of 2D objects. So let's say, for example, that I have a nice little wall right about here. And then we also have our single point. This would be where our character is on the screen and whatnot. And to determine if I actually have run into a problem, what I can do is I can actually use that distance formula to determine if I'm colliding with the wall. For example, the first thing we'd want to do is we'd want to look at the two points of our single object. We'll call this point A and we'll call this point B. Point A is going to have some x and some y associated to it. And point B is also going to have some x and some y associated to it. Now our character, our character, again, we're going to call him point C. He has an x and a y again. Well, what we can do is we can actually look at the distance. Say, for example, the distance between points A and B. I'll call this the distance between A and B. What we can look at here is this is going to be a set amount. It's always going to be, in our case, we'll say that it calculates out to 5, just an arbitrary 5. Well, what we can do is we can look at the distance formula now of our character to the A point and that same distance from our character to the B point. So D from C to A and D from C to B. When I add these two formulas up, if I'm colliding, if that equals the same amount as A to B, then what I've actually run into is C is actually on the wall. So let's have a look at that. Right now, say, for example, we're looking at the distance from C to A. Let's say, for example, that is about a 7. Actually, let's just arbitrarily say it's a 3. And then down here, the distance between C and B, well, that's also a 3. If we add these two distances together, so we'll say D1, which represents C to A, plus D2, which represents C to B, if that equals the distance 3 from A to B, then we know we are colliding with the wall. We are the same distance to the wall. We are here. If it is larger or if it is smaller, we know that we're not at the wall. We actually physically cannot be smaller, but we are farther away. As you can see, we are just a little bit too far away, so this is now not equal. I'll even change that color. We can say that these two are not equal to each other. And as a result, they are not colliding.