## Divide

This Node can be used to divide one value by another. You can specify the values to divide, or supply one or two Node Inputs and the node will output the result of the division of the two values. When specifying values, you can input them directly to the node input boxes, or you can input them through the Inspector window:

The Divide operator will divide the first input sequentially by all other inputs. For example, an input vec2(1, 2) divided by the vec3(3, 4, 5) will output a vec3(0.33, 0.5, 0.2), or an input vec2(1, 2) divided by a float(3) will output a vec2(0.33, 0.66). Note that this operator will interpret any missing input as a value of 1 and always returns a value in the largest vector type of its two inputs.

### Node Inputs

This node accepts the following the inputs:

• ##### X
The input to divide. This can be either a scalar input or a vector input.

• ##### Y
The input to be divided by This can be either a scalar input or a vector input.

Note that when using this node, the following rules will be applied depending on the input values:

Float / Float = Float
Float / Vec2  = Vec2 (the float is converted to a Vec2 with 1 as the second component)
Float / Vec3  = Vec3 (the float is converted to a Vec3 with 1 as the second and third components)
Float / Vec4  = Vec4 (the float is converted to a Vec4 with 1 as the second and third and fourth components)
Vec2 / Vec2   = Vec2
Vec3 / Vec3   = Vec3
Vec4 / Vec4   = Vec4
Vec2 / Float  = Vec2 (the float is converted to a vec2 with 1 as the second component)
Vec3 / Vec2   = Vec3 (the vec2 is converted to a vec3 with 1 as the third component)
Vec4 / Vec2   = Vec4 (the vec2 is converted to a vec4 with 1 as the third and fourth components)
Vec3 / Float  = Vec3 (the float is converted to a vec3 with 1 as the second and third components)
Vec4 / Vec3   = Vec4 (the vec3 is converted to a vec4 with 1 as the fourth component)
Vec4 / Float  = Vec4 (the float is converted to a vec4 with 1 as the second and third and fourth components)

It should also be noted that if any division is by zero, this will not error, but will instead return 0.

### Node Output

The node will output either a scalar (float) value or a vector, depending on the inputs that were used. This value will be the result of dividing the X input by the Y input.