Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
We know that the signature should always be 3 numbers (r, g, b). So, I’d find it a bit dangerous and unnecessarily "clever" to spread the args like that. Plus, it’s now unclear from the consumer’s side what the arguments are supposed to be. (copied my comment from here, to spread awareness)
We know that the signature should always be 3 numbers (r, g, b). So, I’d find it a bit dangerous and unnecessarily "clever" to spread the args like that. Plus, it’s now unclear from the consumer’s side what the arguments are supposed to be.
It would be nice to extract the clamping logic a bit more, to have less redundant definitions of the borders (0 and 255).
This is the way!
I wouldn’t like to have this in a real codebase, as it’s easy to miss/overlook that there’s an implicit (but important) repetition of "not at all" in there. The data structure shouldn’t implicitly contain business logic.