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

/ Reference

Divide two numbers

/

Description

Divides two numbers (according to the specified divisor assignment), and then outputs the result.

Examples

Remainder is discarded.......... Floats are truncated before division........... ......unless there is a float argument

Arguments

initial [int or float]

Optional

Sets an initial value for the divisor. If there is no argument, the divisor is set to 1 initially. A float argument causes the numbers to be divided as floats. (Division by 0 is not allowed. Int division by 0 will have the same result as dividing by 1. Float division by 0 will always cause an output of -2 31 .)

Attributes

Common Box Attributes

Messages

bang

In left inlet: Performs the division with the numbers currently stored.

int

Arguments

input [int]
In left inlet: The number is divided by the number in the right inlet, and the result is sent out the outlet.

  (inlet1)

Arguments

divisor [int]
In right inlet: The number is stored as the divisor (the number to be divided into the number in the left inlet).

float

Arguments

input [float]
Converted to int, unless / has a float argument.

set

Arguments

input [int]
Sets the number to be divided without causing output (bang will output it).

list

Arguments

input and divisor [list]
In left inlet: The first number is divided by the second number, and the result is sent out the outlet.

Output

float

Only if there is an argument with a decimal point.

int

The two numbers in the inlets are divided, and the result is sent out the outlet.

See Also

Name Description
!/
expr
%
Max Basic Tutorial 6: Simple Math in Max Max Basic Tutorial 6: Simple Math in Max