mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- Optimise fFindDistance2D()
to multiply by inverse rather than divide by a constant.
This commit is contained in:
parent
5d7938c24e
commit
b5b9452adb
1 changed files with 2 additions and 2 deletions
|
@ -58,9 +58,9 @@ double fFindDistance2D(int x, int y)
|
|||
if (x<y)
|
||||
std::swap(x,y);
|
||||
|
||||
double t = y + (y / 2.);
|
||||
double t = y + (y * (1. / 2.));
|
||||
|
||||
return (x - (x / 32.) - (x / 128.) + (t / 4.) + (t / 64.));
|
||||
return (x - (x * (1. / 32.)) - (x * (1. / 128.)) + (t * (1. / 4.)) + (t * (1. / 64.)));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue