# Converter: Math

## Node Interface ## Overview

 Function Perform mathematical operations on the input values and output the result Nearest C4D equivalent Xpresso Math node

This node accepts two numerical input values, carries out an operation on them, and outputs the result.

## Settings

Note: a * symbol next to the name indicates the parameter also has an input port. A # symbol indicates that the parameter can only be changed with an input node, not in the node itself.

### Operation drop-down menu

This allows you to select one of a number of mathematical and trigonometrical operations. For an in-depth look at these nodes in Blender, see this page from the Blender Artists forum.

The available operations are:

#### Add

Adds Value1 and Value2 and outputs the result.

#### Subtract

Subtracts Value2 from Value1 and outputs the result.

#### Multiply

Multiplies Value1 and Value2 and outputs the result.

#### Divide

Divides Value1 by Value2 and outputs the result. Note: if Value2 is zero, you are trying to divide a number by zero, which is not allowed; in this case, the output will always be zero.

#### Sine, Cosine, Tangent, Arcsine, Arccosine, Arctangent

Performs the selected trigonometrical function on Value1 and outputs the result. Note: Value2 is ignored.

#### Power

Calculates Value1 to the power of Value2 and outputs the result. So if Value2 is 2, the result is the square of Value1. If Value2 is 0.5, the result is the square root of Value1.

#### Logarithm

Calculates the logarithm of Value1 to the base of the number in Value2. For the usual base10 log, you would enter 10 into Value2.

#### Minimum

Compares Value1 with Value2 and outputs whichever is the smaller.

#### Maximum

Compares Value1 with Value2 and outputs whichever is the larger.

#### Round

Rounds Value1 to the nearest integer. A value of 0.4 would be rounded to 0; a value of 0.6 would be rounded to 1. Note: Value2 is ignored.

#### Less Than

Compares Value1 to Value2, and returns 1 if Value1 is less than Value2, otherwise returns 0.

#### Greater Than

Compares Value1 to Value2, and returns 1 if Value1 is greater than Value2, otherwise returns 0.

#### Modulo

Returns the modulo of the two values. That is, it divides Value1 by Value2 and returns the remainder. So if Value 1 is 4, and Value2 is 2, the output is 0 (because 4 is divided by 2 with no remainder) but if Value2 is 3, the result is 1 (4 divided by 3 leaves a remainder of 1).

#### Absolute

Returns the absolute value of Value1. That is, negative numbers are converted to positive ones. Note: Value2 is ignored.

#### Arctan2

Returns the arctangent of the number in Value1. It differs from the normal Arctangent function as it distinguishes between opposite directions and returns negative values where appropriate. In general use this function rather than the earlier Arctangent.

#### Floor

Rounds down the number in Value1 to the next lowest integer (e.g. Floor of 1.6 is 1).

#### Ceil

Rounds up the number in Value1 to the next highest integer (e.g. Ceil of 1.4 is 2).

#### Fract

Takes the number in Value1 and returns only the fractional part. E.g. Fract of 2.45 is 0.45.

#### Square Root

Returns the square root of the number in Value1.

### Clamp

If checked, this switch limits the output to the range 0.0 to 1.0.

### Value1 *

The first input value.

### Value2 *

The second input value.

## Output

### Value

The result after the operation is carried out.