string-to-float

bradzilla84/bradzilla84-utilities/string-to-float

Convert a number stored in a string to a Float Number
string-to-float
@/string-to-float
Convert a number stored in a string to a Float Number
INstring
Input Number as a String
string-to-float
IN
OUT
OUTnumber
Output Numer as INT
To use the node in your project you should have the bradzilla84/bradzilla84-utilities 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) {
    char TXTC[16] = { 0 };
    auto inValue = getValue<input_IN>(ctx);
    dump(inValue, TXTC);
    emitValue<output_OUT>(ctx, atof(TXTC));
}