Skip to content

Commit

Permalink
fix issue #983 INT(1.99) doesn't return correct rounded value
Browse files Browse the repository at this point in the history
  • Loading branch information
deleteJ authored and tonyqus committed Aug 23, 2023
1 parent b69a950 commit 5f64f3e
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 5f64f3e

Please sign in to comment.