Please refer below code.
currentAxis.Range.Start = 1956.9
tempInterval = currentAxis.Range.Start
currentAxis.Range.Interval = 0.4
tempInterval += currentAxis.Range.Interval;
It will return the value 1957.3000000000001
instead of 1957.3
. I don't want to use the toFixed()
method to remove the decimal values in point, because some times the interval value will be 0.0004
that time it will return 4 digits after the point. Based on the interval it will vary.
I need 1956.9 +0.4= 1957.3
with out using toFixed()
method. How can i solve this?