mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-13 11:30:44 +00:00
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:
parent
5f748fc17e
commit
90412527e0
1 changed files with 2 additions and 5 deletions
|
@ -78,11 +78,8 @@ static inline int32_t sepldist(const int32_t dx, const int32_t dy)
|
||||||
{
|
{
|
||||||
vec2_t d = { klabs(dx), klabs(dy) };
|
vec2_t d = { klabs(dx), klabs(dy) };
|
||||||
|
|
||||||
if (playing_rr)
|
|
||||||
{
|
|
||||||
if (!d.y) return d.x;
|
if (!d.y) return d.x;
|
||||||
if (!d.x) return d.y;
|
if (!d.x) return d.y;
|
||||||
}
|
|
||||||
|
|
||||||
if (d.x < d.y)
|
if (d.x < d.y)
|
||||||
swaplong(&d.x, &d.y);
|
swaplong(&d.x, &d.y);
|
||||||
|
|
Loading…
Reference in a new issue