diff options
Diffstat (limited to 'rotord/src/nodes_maths.h')
| -rw-r--r-- | rotord/src/nodes_maths.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/rotord/src/nodes_maths.h b/rotord/src/nodes_maths.h index 760040d..1853e2c 100644 --- a/rotord/src/nodes_maths.h +++ b/rotord/src/nodes_maths.h @@ -63,12 +63,13 @@ namespace Rotor { #define ARITHMETIC_jolt 10 #define ARITHMETIC_floor 11 #define ARITHMETIC_2pow 12 +#define ARITHMETIC_reciprocal 13 class Arithmetic: public Signal_node { public: Arithmetic(){ create_signal_input("signal","Signal"); create_parameter("value","number","Value or signal for operation","Value",1.0f); - create_attribute("operator","operator for image","Operator","+",{"+","-","*","/","%","^","sin","cos","ease","jolt","floor","2pow"}); + create_attribute("operator","operator for image","Operator","+",{"+","-","*","/","%","^","sin","cos","ease","jolt","floor","2pow","reciprocal"}); title="Arithmetic"; description="Performs arithmetic on a signal with a signal or value"; }; @@ -124,6 +125,9 @@ namespace Rotor { case ARITHMETIC_2pow: return pow(2,in); break; + case ARITHMETIC_reciprocal: + return parameters["value"]->value/in; + break; } } } |
