Gamer-Dad / warlordsredux.altis

WSM WarlordsRedux
13 stars 28 forks source link

documenting base distances #236

Closed korbelz closed 4 months ago

korbelz commented 5 months ago

Added human readable values to the base distance code for future devs.

Uganda-streaming commented 5 months ago

Let's goo

Uganda-streaming commented 5 months ago

Don't we want to change the sqrDistance to distance function just to make it simpler?

korbelz commented 5 months ago

Per the wiki right now DistanceSqr is the "best" way to do it. It could be done either way, if you look at the 2.18 alt syntax you can see DistanceSqr is skipping one step of the math.

If you can watch this video from khan academy where you live it might explain it better than I can: https://www.khanacademy.org/math/geometry/hs-geo-analytic-geometry/hs-geo-distance-and-midpoints/v/distance-formula

Uganda-streaming commented 5 months ago

Per the wiki right now DistanceSqr is the "best" way to do it. It could be done either way, if you look at the 2.18 alt syntax you can see DistanceSqr is skipping one step of the math.

If you can watch this video from khan academy where you live it might explain it better than I can: https://www.khanacademy.org/math/geometry/hs-geo-analytic-geometry/hs-geo-distance-and-midpoints/v/distance-formula

But don't we do two more steps to do it by squaring the distance first? :D