Commit bb4a737b authored by Steven Fuller's avatar Steven Fuller

version of FixedByFrac that generates much better code.

parent 6bebd8bb
...@@ -58,13 +58,7 @@ typedef _int64 int64_t; ...@@ -58,13 +58,7 @@ typedef _int64 int64_t;
#endif #endif
fixed FixedByFrac(fixed a, fixed b) fixed FixedByFrac(fixed a, fixed b)
{ {
int64_t ra = a; return (fixed)(((int64_t)(a * (int64_t)b))>>TILESHIFT);
int64_t rb = b;
int64_t r;
r = ra * rb;
r >>= TILESHIFT;
return (fixed)r;
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment