Skip to content

Commit

Permalink
fix succd and predd to work correctly with negative numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhillman committed Mar 12, 2013
1 parent 8caf27b commit 090505e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IlmBase/Imath/ImathFun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ succd (double d)

u.i = 0x0000000000000001LL;
}
else if (u.i > 0)
else if (u.d > 0)
{
// Positive double, normalized or denormalized.
// Incrementing the largest positive double
Expand Down Expand Up @@ -159,7 +159,7 @@ predd (double d)

u.i = 0x8000000000000001LL;
}
else if (u.i > 0)
else if (u.d > 0)
{
// Positive double, normalized or denormalized.

Expand Down

0 comments on commit 090505e

Please sign in to comment.