round

Returns the closest integer to its floating point argument.

Example

Find the closest integer to 56.10145.

round(56.10145)

In this example, 56 is returned.

Find the closest integer to 0.6724.

round(0.6724)

This example evaluates to 1.

Syntax

round(double expr x)
  • x : expression evaluating to double

    Returns

    long

Notes

round() returns the closest integer to its double argument.

See Also


© Incorta, Inc. All Rights Reserved.