I am porting some code to .Net, and I realized that the Trunc method does not work properly in Delphi. It does not take into account whether you are truncating a negative or positive value. He views the argument as absolute.
Delphi
Trunc(-163.78999) returns -163
. Network deployment
System.Math.Floor(-163.88888888888889) returns -164.
I can imitate implementations, but I wonder if anyone has seen this before.
Thank,
source
share