round

Rounds a number to the closest integer.

round(number) → returns numeric

round 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