Skip to content

Commit 9df01d3

Browse files
committed
Tweak SlopeDiv
1 parent 0316ac2 commit 9df01d3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/r_main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,8 @@ R_PointOnSegSide
267267

268268
static CONSTFUNC int SlopeDiv(unsigned num, unsigned den)
269269
{
270-
den = den >> 8;
271-
272-
if (den == 0)
270+
den >>= 8;
271+
if (den < 2)
273272
return SLOPERANGE;
274273

275274
const unsigned int ans = FixedApproxDiv(num << 3, den) >> FRACBITS;

0 commit comments

Comments
 (0)