SmoothMath Reference

API Reference

Detailed API reference for SmoothMath functions:

Tip: By default output is set to return, but you can add output='print' to print it.

add(x, y, [output='return|print'])

Adds two numbers and outputs the result.

sm.add(2, 4)
#Result is 6

subtract(x, y, [output='return|print'])

Subtracts two numbers and outputs the result.

sm.subtract(2, 4)
#Result is -2

multiply(x, y, [output='return|print'])

Multiplies two numbers and outputs the result.

sm.multiply(2, 4)
#Result is 8

divide(x, y, [output='return|print'])

Divides two numbers and outputs the result.

sm.multiply(2, 4)
#Result is 0.5