Math
Does arithmetic on a number, or on a value that varies across a surface.
add, subtract, multiply, divide, arithmetic, sine, modulo, calculate- Category
- Values
- Outputs
- value
- Runs live in
- Godot, Roblox
Add, multiply, take a minimum, take a sine. It works the same on a single number and on a value that changes from point to point, so the same node scales a knob or reshapes a noise pattern.
Reach for it when the relationship really is arithmetic. When what you want is a shape, a curve through a handful of points, use Value Ramp instead: a profile drawn with four stops replaces a dozen of these.
Inputs
| Socket | Type | Wiring |
|---|---|---|
| fieldA | field, optional | |
| fieldB | field, optional |
Parameters
| Name | Type | Default | Available when | What it does |
|---|---|---|---|---|
| type | Add | Subtract | Multiply | Divide | Sine | Cosine | Tangent | Modulo | Floor | Round | Absolute | Minimum | Maximum | Sqrt | Power | Arctangent | Add | always | Sine, Cosine and Tangent work in radians, while every rotation setting in the editor is in degrees. If one number feeds both, multiply it by 0.017453 on the way into the trig. Arctangent is the two-input kind: it reads both sockets together and gives the angle around the origin, which is what you want for anything that fans out radially. |
| inputA | number | 0 | always | |
| inputB | number | 0 | always |
Watch out
A sine that runs far too fast is usually degrees fed into something expecting radians. One full cycle is about 6.28, not 360.
Built with this node
- Make things moveHow-to
- Combine and cutHow-to
- My animation does not moveFix
- Make It Bobteaches this
- Build Half, Get the Wholeuses it
- Cut a Doorwayuses it
- Make It Spinuses it
- Paint Each Part Before You Joinuses it
- Snap Parts Togetheruses it
2 more teaching graphs use it without being about it.