Java.Lang.Math.Round Method
Returns the result of rounding the argument to an integer.

Syntax

[Android.Runtime.Register("round", "(F)I", "")]
public static int Round (float f)

Parameters

f
the value to be rounded.

Returns

Documentation for this section has not yet been entered.

Remarks

Returns the result of rounding the argument to an integer. The result is equivalent to (int) Math.floor(f+0.5).

Special cases:

  • round(+0.0) = +0.0
  • round(-0.0) = +0.0
  • round((anything > Integer.MAX_VALUE) = Integer.MAX_VALUE
  • round((anything
  • round(+infinity) = Integer.MAX_VALUE
  • round(-infinity) = Integer.MIN_VALUE
  • round(NaN) = +0.0

[Android Documentation]

Requirements

Namespace: Java.Lang
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1