Closed nickdiacre closed 6 years ago
I'm thinking to put this into the 'feature' category... The Add (and Sub/Mul/Div/etc) take the type of the first input pin to define the output type. The default value is always a string, but may be interpreted on other nodes as another type if that input pin is expecting a float or int, for instance.
In the case of nodes which have a variable output type, we would have to add special cases to say 'does this input look like a number, if it does then treat it as a float (or int, or double, etc)', which might work a lot of the time (and I agree is probably the more expected behaviour) but what about if you wanted to add the strings '1' and '2' together - it would override your types and treat them as numbers, with no work around.
These nodes add 1 + 2 and return 12, parsing as strings rather than int/float.
Expectation would be that they were floats.
Many thanks,
Nick