# 运算#

## 输入#

The inputs of the node are dynamic. Some inputs are only available for certain operations. For instance, the Addend input is only available for the Multiply Add operator.

Epsilon

## 属性#

Returns the positive remainder of a division operation.

Bounces back and forth between 0.0 and the Scale as the input value increases.

## 示例#

### 自定义Z深度通道节点设置#

The top Render Layers node has a cube that is about 10 units from the camera. The bottom Render Layers node has a plane that covers the left half of the view and is 7 units from the camera. Both are fed through their respective Map Value nodes to multiply the depth value by 0.05 and clamp it to [0.0, 1.0], bringing it into a suitable range for displaying it as a color.

The Minimum node selects the smallest of the two depth values at each pixel. In the left half, it chooses the plane (because it's closer than the cube), and in the right half, it chooses the cube (because it's closer than the background, which is infinitely far away).

The Maximum node selects the largest of the two depth values at each pixel. In the left half, it chooses the cube (because it's farther away than the plane), and in the right half, it chooses the background (because it's farther away than the cube).

### 使用正弦功能得到不断循环的变化数#

Since the sine function can output values between (-1.0 to 1.0), the Map Value node scales that to 0.0 to 1.0 by taking the input (-1 to 1), adding 1 (making 0 to 2), and multiplying the result by 0.5 (thus scaling the output between 0 to 1). The default Color Ramp converts those values to a gray-scale. Thus, medium gray corresponds to a 0.0 output by the sine, black to -1.0, and white to 1.0. As you can see, $$sin(pi/ 2) = 1.0$$. Like having your own visual color calculator! Animating this node setup provides a smooth cyclic sequence through the range of grays.

### 提亮（缩放）通道#

This example has a Math (Multiply) node increasing the luminance channel (Y) of the image to make it brighter. Note that you should use a Map Value node with min() and max() enabled to clamp the output to valid values. With this approach, you could use a logarithmic function to make a high dynamic range image. For this particular example, there is also a Brightness/Contrast node that might give simpler control over brightness.

### 重新限定颜色选择（色调分离）#

To split up a continuous range of values between 0 and 1 to certain set of values, the following function is used: $$round(x × n - 0.5) / (n - 1)$$, where "n" is the number of possible output values, and "x" is the input pixel color. Read more about this function.

In the case of a color image, you need to split it into separate RGB channels using Separate/Combine Color nodes and perform this operation on each channel independently.