openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

Ofcolor vector constructor

Open artificiel opened this issue 2 years ago • 1 comments

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]);

artificiel avatar Oct 04 '23 00:10 artificiel

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

artificiel avatar Oct 04 '23 03:10 artificiel