round

Rounds the specified number to the nearest integer.

Syntax

round(x)

Parameters

Parameter

Type

Description

x

number

Numeric value

Return

Returns the integer that is closest to x

Examples

Python

y = round(1.3)
# y now is 1
y = round(1.6)
# y now is 2

NexScript

y = round(1.3)
% y now is 1
y = round(1.6)
% y now is 2