Skip to content

Commit

Permalink
src/m_fixed: Definitely don't want to pull in 'double' !
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Munaut <[email protected]>
  • Loading branch information
smunaut committed Jan 16, 2021
1 parent 82a7bfc commit a9b826e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/m_fixed.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ FixedDiv2
( fixed_t a,
fixed_t b )
{
#if 0
#if 1
long long c;
c = ((long long)a<<16) / ((long long)b);
return (fixed_t) c;
#endif

#else
double c;
c = ((double)a) / ((double)b) * FRACUNIT;
if (c >= 2147483648.0 || c < -2147483648.0)
I_Error("FixedDiv: divide by zero");
return (fixed_t) c;
#endif
}

0 comments on commit a9b826e

Please sign in to comment.