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

round(1.56)

Expected Result: 2


Round 1.49

round(1.49)

Expected Result: 1


Round -0.9

round(-0.9)

Expected Result: -1


Fork me on GitHub