round()

Math / Calculation

Description

Calculates the integer closest to the parameter.

Syntax

float round(float x)

Parameters

NameTypeDescription
xfloatnumber to round

Returns

float

Related

Under the Hood

From Processing.h:

static float round(float x) { return std::round(x); } static float round(float x) { return std::round(x);