Rounding off number

Discussion in 'C#' started by sweet_babylhyn, Aug 31, 2010.

  1. sweet_babylhyn

    sweet_babylhyn New Member

    Joined:
    Aug 31, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello guys,

    How can I get the round off number disregarding the next number specify in length of decimal places in math.round. Example, I want to round off 1.499 to 1.49 not 1.5.

    My program has a condition if the decimal places is more than .05, it will add 1. example 1.0521 will become 2. But if its 1.0498 will become 1.

    It is possible guys?

    Thanks in advance.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice