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;
#endif
fixed FixedByFrac(fixed a, fixed b)
{
int64_t ra = a;
int64_t rb = b;
int64_t r;
r = ra * rb;
r >>= TILESHIFT;
return (fixed)r;
return (fixed)(((int64_t)(a * (int64_t)b))>>TILESHIFT);
}
#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