round

Rounds a number to the closest integer.

round(number) → returns numeric

Argument Reference

number numeric
Required

Examples
Sample code invoking the round function

round(1.56)

Expected Result: 2

round(1.49)

Expected Result: 1

round(-0.9)

Expected Result: -1


Fork me on GitHub