Skip to content

Commit

Permalink
Merge pull request #1109 from deleteJ/issue#983
Browse files Browse the repository at this point in the history
fix issue #983 INT(1.99) doesn't return correct rounded value
  • Loading branch information
tonyqus authored Jun 29, 2023
2 parents 7a218cc + 81d6a55 commit 32435d9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions main/SS/Formula/Functions/Int.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ public class Int : OneArg

public override double Evaluate(double d)
{
if (d > 0)
return Math.Round(d - 0.49);
else
return Math.Round(d - 0.5);
return Math.Floor(d);
}

}
Expand Down

0 comments on commit 32435d9

Please sign in to comment.