Package java.lang
Class Math

Public Method round

static int round(float a)

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Rounds a float number to the nearest integer number (round up or down) and returns this value as int. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type int.

Note

Example

   Draw.writeText("data: " + Math.round(9.23f));

The example above draws the calculated value to the screen.