Determining Distance between 2 points From: "Chris Williams" <williac6@rjrt.com> Date: Mon, 11 Sep 2000 20:22:52 +0000 I'm calculating the distance for missle fire (arrows or rocks) and I have one question. When I plot out two points on a grid, and then use Pythagorean Theorem to calculate distance, I often come up with (at least) one square more than the actual number of squares on the most direct path (based on my grid). Should I subtract one from my calculated results, or add 1 to the number of squares? For Example: If I eyeball it on the grid, it's 5 squares from point a (top left) to point b (bottom right). If I actually calculate it, it's 7.07. Of course we would round down to 7 squares, since we can't have a partial square. Any suggestions? a=5 . . . . . . . 5^2 + 5^2 = d^2 .+- - -+. 25 + 25 = d^2 . . \ . . | . 50 = d^2 . . . \ . | . b=5 7.07 = d . . . . \ | . . . . . .+. d = 7 (rounded) . . . . . . . So my result is 7, but if you base it off the grid, d should equal 5. Any advice is appreciated. Chris Williams Referenced By Up