p5.js icon indicating copy to clipboard operation
p5.js copied to clipboard

[p5.strands] should instanceID() be auto-converted to a float?

Open davepagurek opened this issue 5 months ago • 8 comments
trafficstars

Topic

I was working on this sketch https://openprocessing.org/sketch/2664809 and instanceID() / 10 gives a type error, but 0.1 * instanceID() does not. For consistency and to reduce the number of times a programmer has to manually convert between numeric types, do you think we should just auto-convert instanceID() to a float behind the scenes?

davepagurek avatar Jun 01 '25 12:06 davepagurek