Math.Ceiling Tips

<>

This question already has an answer here:

Answers


How about using Math.Round(double, int) overload with 1 digit?

Math.Round(3.79, 1) // 3.8

Are you looking for

 double number = Math.Ceiling(3.79 * 10.0) / 10.0;

if you want to Round (not find the Ceiling)

 double number = Math.Round(3.79, 1);

Please, note the difference:

  Ceiling(32.1) == 33
  Round(32.1)   == 32

Need Your Help

Can I get Doxygen to merge namespace contents in different files?

c++ doxygen

I have different .h files that each provide declarations in the same namespace. Doxygen generates a new entry for each file, with the same name. Can I make doxygen to merge all these?

How to convert an entire MySQL database characterset and collation to UTF-8?

mysql character-encoding

How can I convert entire MySQL database character-set to UTF-8 and collation to UTF-8?