How to round float values up at .6 and down if .5 and below

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nimbus

    #1

    How to round float values up at .6 and down if .5 and below

    In my case, if the float value is 74.716, it has to rounding into 74.72. But is that value is 74.715, it should be 74.71..

    can anyone tel me what rounding ways i need to use?

    Thanks in advance
  • Dheeraj Joshi
    Recognized Expert Top Contributor
    • Jul 2009
    • 1129

    #2
    Use round method available in math class

    Take a look here.

    Regards
    Dheeraj Joshi

    Comment

    • Dheeraj Joshi
      Recognized Expert Top Contributor
      • Jul 2009
      • 1129

      #3
      If this won't work for you. You need to implement your own algorithm.

      Regards
      Dheeraj Joshi

      Comment

      Working...