openFrameworks
openFrameworks copied to clipboard
Ofcolor vector constructor
is this too crude? inits an empty color then calls the appropriate setter based on number of elements.
use case: parsing a config files with colours that get passed as vectors, so:
ofColor(my_color_vector);
instead of
ofColor(my_color_vector[0], my_color_vector[1], my_color_vector[2], my_color_vector[3]);
well, I stumbled in a case where typename and class are not synonymous — but of course appleClang (current dev env) did not mind so I had to learn via GitHub CI... https://stackoverflow.com/questions/2023977/what-is-the-difference-between-typename-and-class-template-parameters