scale-values

vasily/troyka-mq2/scale-values

No description
scale-values
@/scale-values
RATIOnumber
KAnumber
KBnumber
scale-values
OUT
RATIO
KA
KB
OUTnumber
To use the node in your project you should have the vasily/troyka-mq2 library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    auto ratio = getValue<input_RATIO>(ctx);
    auto Ka = getValue<input_KA>(ctx);
    auto Kb = getValue<input_KB>(ctx);
    delay(0);
    auto scaledOut = exp((log(ratio) - Kb) / Ka);

    emitValue<output_OUT>(ctx, scaledOut);
}