1

I have a double number like 1,01 and I want to make it 2 when it has a oversupply??

double number1 = 1,01
double number2 = 1,1
double number3 = 1,00000001

these are must be 2

Merve Gül
  • 1,377
  • 6
  • 23
  • 40
  • Everything you need to know about this can be found at http://stackoverflow.com/questions/14/whats-the-difference-between-math-floor-and-math-truncate-in-net/580252#580252. – paxdiablo Apr 04 '12 at 12:38

1 Answers1

16
double roundedUp = Math.Ceiling(number);
Kendall Frey
  • 43,130
  • 20
  • 110
  • 148