Jump to content

Hue rounding errors


Recommended Posts

I noticed that the hue is being rounded down (aka "floored") instead of being rounded to the nearest number.


For example, let's say I select RGB values 255, 100, 0. At this point the hue is 60 * (green - blue) / (max - min) = 60 * (100 - 0) / (255 - 0) = 23.529. I would expect that to be rounded to 24, but Paint.NET shows 23.


Is there a reason for this behaviour or is this a bug?

Edited by Gerben
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...