diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-08-26 13:18:02 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-08-26 13:18:02 +0100 |
| commit | 8bc47c7a4ec05f1d1e29de283a47923a1d6d340b (patch) | |
| tree | bad28e2ed4fb55c1c3855a9df96716a20a4fde95 /rotord/src/nodes_maths.h | |
| parent | 084697db61ba3adfee7fbd054d8d5ac7a0c62485 (diff) | |
finished json loader
Diffstat (limited to 'rotord/src/nodes_maths.h')
| -rw-r--r-- | rotord/src/nodes_maths.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rotord/src/nodes_maths.h b/rotord/src/nodes_maths.h index eb685eb..760040d 100644 --- a/rotord/src/nodes_maths.h +++ b/rotord/src/nodes_maths.h @@ -61,12 +61,14 @@ namespace Rotor { #define ARITHMETIC_cos 8 #define ARITHMETIC_ease 9 #define ARITHMETIC_jolt 10 +#define ARITHMETIC_floor 11 +#define ARITHMETIC_2pow 12 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"}); + create_attribute("operator","operator for image","Operator","+",{"+","-","*","/","%","^","sin","cos","ease","jolt","floor","2pow"}); title="Arithmetic"; description="Performs arithmetic on a signal with a signal or value"; }; @@ -116,6 +118,12 @@ namespace Rotor { case ARITHMETIC_jolt: return ((1.0-parameters["value"]->value)*in)+(parameters["value"]->value*(0.5f+((sin((fmod(in,1.0f)+1.0f)*M_PI))*0.5f))); break; + case ARITHMETIC_floor: + return floor(in); + break; + case ARITHMETIC_2pow: + return pow(2,in); + break; } } } |
