Converting Float to String with decimal length
I am subtracting 2 values var diff = (2.85 - 2.8) - These values are captured from a screen and converted from a string to Float
Now the diff shows as 0.050000000000026.
How do I cut the size of above diff value to 2 decimals ( 0.50) ?
I have tried to convert the diff from Float to String but it showing as "5.000000000003E-02"
Any help with decimal positions in Float or exact conversion of Float to Str ?
I am using TestComplete Version: 14.73.382.7 x64
Solved! Go to Solution.