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

round Reference

round to nearest integer

round

Examples

Constructors

  • { arguments={base}, inlets={input} }
  • { arguments={}, inlets={input, base} }

Inlets

input

Typefloat

value to round

base

Typefloat

round to a multiple of

Attributes

mode [enum] (default: nearest)

g/s(set)

Determines whether rounding is to nearest multiple in either direction, or the closest multiple toward negative infinity (floor), toward zero (trunc) or toward positive infinity (ceil).

Possible values:

0 = 'trunc'
1 = 'ceil'
2 = 'nearest'
3 = 'floor'

Common Box Attributes

See Also

Name Description
ceil
floor