Share via


Math.rint

Class Overview | Class Members | This Package | All Packages

Syntax

public static native double rint( double a )

Parameters
  • a
    a double value.
Returns

the closest double value to a that is equal to a mathematical integer. If two double values that are mathematical integers are equally close to the value of the argument, the result is the integer value that is even.

Description

returns the closest integer to the argument.