Math.Round down???

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

I would like to round to the whole number. For example 12.98 I would
like this to round to 12. The current statement I have is:

TopSquareRoot = Math.Round(TopSquareRoot);

TopSquareRoot is a Double.

How do I do this?

Thanks in advance - Dan
 
Use Math.Floor() to accomplish this.

TopSquareRoot = Math.Floor(TopSquareRoot);

should do the trick.
 
Back
Top