A newer version of Max is available. Click here to access the latest version of the documentation

round Reference

Round to a value

round

Description

Calculates and outputs an integer multiple of any given number.

Arguments

multiple [number]

Optional

An argument can be used to specify the value to whose nearest multiple the rounding will be done.

Attributes

nearest [int]

When set to 1 (the default), the round object will round to the nearest multiple of the specified number value.

Note: This attribute does not set the rounding step (which is set using round object's right inlet), It specifies that rounding to the nearest number value will occur.

Common Box Attributes

Messages

int

Arguments

input [int]
Value to be rounded, Number values received in the left inlet will be rounded to either the absolute nearest integer multiple or the nearest integer multiple between the value received in this inlet or 0 (see the nearest attribute for more information).

float

Arguments

input [float]
Value to be rounded.

list

Arguments

input [list]
Values to be rounded.

anything

Arguments

input [list]
Values to be rounded.

Output

float

The nearest whole numbers of the input.

list

List of the nearest whole numbers of the input list.

See Also

Name Description
Organizing Your Patch Organizing Your Patch
The Max Environment The Max Environment
expr
vexpr
round~