Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added simple arithmatic operators to artist::colour and a test #23

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

bruno-j-nicoletti
Copy link

Added +, - and * operators to artist::colour, along with a simple test.

@djowel
Copy link
Member

djowel commented Mar 17, 2024

Thank you @bruno-j-nicoletti . Looks good to me!

@bruno-j-nicoletti
Copy link
Author

I was tempted to add a float& operator[](int index) to artist::color as well, along with a begin/end so you can treat a colour as in iterable object. There would be both const and non const versions of those. Not that pressing though.

@djowel djowel merged commit e7007e3 into cycfi:master Mar 18, 2024
3 checks passed
@djowel
Copy link
Member

djowel commented Mar 18, 2024

I was tempted to add a float& operator[](int index) to artist::color as well, along with a begin/end so you can treat a colour as in iterable object. There would be both const and non const versions of those. Not that pressing though.

Nah. It takes discipline to not be carried away. I'm glad you were not tempted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants