Improve accuracy of sepldist when one dimension is zero

Backported from Rednukem.

git-svn-id: https://svn.eduke32.com/eduke32@8442 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/common.h
This commit is contained in:
hendricks266 2019-12-18 09:31:32 +00:00 committed by Christoph Oelckers
parent 5f748fc17e
commit 90412527e0

View file

@ -78,11 +78,8 @@ static inline int32_t sepldist(const int32_t dx, const int32_t dy)
{
vec2_t d = { klabs(dx), klabs(dy) };
if (playing_rr)
{
if (!d.y) return d.x;
if (!d.x) return d.y;
}
if (!d.y) return d.x;
if (!d.x) return d.y;
if (d.x < d.y)
swaplong(&d.x, &d.y);