# CompositorNodeMath(CompositorNode)

base classes — `bpy_struct`, `Node`, `NodeInternal`, `CompositorNode`

class `bpy.types.``CompositorNodeMath`(CompositorNode)
  `operation`
    - `ADD` Add, A + B.
    - `SUBTRACT` Subtract, A - B.
    - `MULTIPLY` Multiply, A * B.
    - `DIVIDE` Divide, A / B.
    - `MULTIPLY_ADD` Multiply Add, A * B + C.
    - `POWER` Power, A power B.
    - `LOGARITHM` Logarithm, Logarithm A base B.
    - `SQRT` Square Root, Square root of A.
    - `INVERSE_SQRT` Inverse Square Root, 1 / Square root of A.
    - `ABSOLUTE` Absolute, Magnitude of A.
    - `EXPONENT` Exponent, exp(A).
    - `MINIMUM` Minimum, The minimum from A and B.
    - `MAXIMUM` Maximum, The maximum from A and B.
    - `LESS_THAN` Less Than, 1 if A < B else 0.
    - `GREATER_THAN` Greater Than, 1 if A > B else 0.
    - `SIGN` Sign, Returns the sign of A.
    - `COMPARE` Compare, 1 if (A == B) within tolerance C else 0.
    - `SMOOTH_MIN` Smooth Minimum, The minimum from A and B with smoothing C.
    - `SMOOTH_MAX` Smooth Maximum, The maximum from A and B with smoothing C.
    - `ROUND` Round, Round A to the nearest integer. Round upward if the fraction part is 0.5.
    - `FLOOR` Floor, The largest integer smaller than or equal A.
    - `CEIL` Ceil, The smallest integer greater than or equal A.
    - `TRUNC` Truncate, trunc(A).
    - `FRACT` Fraction, The fraction part of A.
    - `MODULO` Modulo, A mod B.
    - `SNAP` Snap, Snap to increment, snap(A,B).
    - `WRAP` Wrap, Wrap value to range, wrap(A,B).
    - `PINGPONG` Pingpong, Wraps a value and reverses every other cycle (A,B).
    - `SINE` Sine, sin(A).
    - `COSINE` Cosine, cos(A).
    - `TANGENT` Tangent, tan(A).
    - `ARCSINE` Arcsine, arcsin(A).
    - `ARCCOSINE` Arccosine, arccos(A).
    - `ARCTANGENT` Arctangent, arctan(A).
    - `ARCTAN2` Arctan2, The signed angle arctan(A / B).
    - `SINH` Hyperbolic Sine, sinh(A).
    - `COSH` Hyperbolic Cosine, cosh(A).
    - `TANH` Hyperbolic Tangent, tanh(A).
    - `RADIANS` To Radians, Convert from degrees to radians.
    - `DEGREES` To Degrees, Convert from radians to degrees.

    Type: | enum in [‘ADD’, ‘SUBTRACT’, ‘MULTIPLY’, ‘DIVIDE’, ‘MULTIPLY_ADD’, ‘POWER’, ‘LOGARITHM’, ‘SQRT’, ‘INVERSE_SQRT’, ‘ABSOLUTE’, ‘EXPONENT’, ‘MINIMUM’, ‘MAXIMUM’, ‘LESS_THAN’, ‘GREATER_THAN’, ‘SIGN’, ‘COMPARE’, ‘SMOOTH_MIN’, ‘SMOOTH_MAX’, ‘ROUND’, ‘FLOOR’, ‘CEIL’, ‘TRUNC’, ‘FRACT’, ‘MODULO’, ‘SNAP’, ‘WRAP’, ‘PINGPONG’, ‘SINE’, ‘COSINE’, ‘TANGENT’, ‘ARCSINE’, ‘ARCCOSINE’, ‘ARCTANGENT’, ‘ARCTAN2’, ‘SINH’, ‘COSH’, ‘TANH’, ‘RADIANS’, ‘DEGREES’], default ‘ADD’

  `use_clamp`

    Clamp result of the node to 0..1 range

    Type: | boolean, default False

  classmethod `is_registered_node_type`()

    True if a registered node type

    Returns: | Result
    Return type: | boolean

  classmethod `input_template`(index)

    Input socket template

    Parameters: | index (int in [0, inf]) – Index
    Returns: | result
    Return type: | `NodeInternalSocketTemplate`

  classmethod `output_template`(index)

    Output socket template

    Parameters: | index (int in [0, inf]) – Index
    Returns: | result
    Return type: | `NodeInternalSocketTemplate`

  `update`()
  classmethod `bl_rna_get_subclass`(id, default=None)

    Parameters: | id (string) – The RNA type identifier.
    Returns: | The RNA type or default when not found.
    Return type: | `bpy.types.Struct` subclass

  classmethod `bl_rna_get_subclass_py`(id, default=None)

    Parameters: | id (string) – The RNA type identifier.
    Returns: | The class or default when not found.
    Return type: | type

Inherited Properties

`bpy_struct.id_data` `Node.type` `Node.location` `Node.width` `Node.width_hidden` `Node.height` `Node.dimensions` `Node.name` `Node.label` `Node.inputs` `Node.outputs` `Node.internal_links` `Node.parent` `Node.use_custom_color` `Node.color` `Node.select` | `Node.show_options` `Node.show_preview` `Node.hide` `Node.mute` `Node.show_texture` `Node.bl_idname` `Node.bl_label` `Node.bl_description` `Node.bl_icon` `Node.bl_static_type` `Node.bl_width_default` `Node.bl_width_min` `Node.bl_width_max` `Node.bl_height_default` `Node.bl_height_min` `Node.bl_height_max`

Inherited Functions

`bpy_struct.as_pointer` `bpy_struct.driver_add` `bpy_struct.driver_remove` `bpy_struct.get` `bpy_struct.is_property_hidden` `bpy_struct.is_property_overridable_library` `bpy_struct.is_property_readonly` `bpy_struct.is_property_set` `bpy_struct.items` `bpy_struct.keyframe_delete` `bpy_struct.keyframe_insert` `bpy_struct.keys` `bpy_struct.path_from_id` `bpy_struct.path_resolve` `bpy_struct.pop` `bpy_struct.property_overridable_library_set` `bpy_struct.property_unset` `bpy_struct.type_recast` `bpy_struct.values` `Node.socket_value_update` | `Node.is_registered_node_type` `Node.poll` `Node.poll_instance` `Node.update` `Node.insert_link` `Node.init` `Node.copy` `Node.free` `Node.draw_buttons` `Node.draw_buttons_ext` `Node.draw_label` `Node.poll` `NodeInternal.poll` `NodeInternal.poll_instance` `NodeInternal.update` `NodeInternal.draw_buttons` `NodeInternal.draw_buttons_ext` `CompositorNode.tag_need_exec` `CompositorNode.poll` `CompositorNode.update`