aloisdg / aloisdg/Licorne

What precision is good enough?

Open
#12 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
C#
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Hello,

I was wondering what would be a good precision for the `double.Equals` of color component. In my test I found that `0.05` was good enough, but it is an opinionated choice. I am not sure about it. Can we go lower? Should we stay higher? I don't really know. I would love to find a good way to calculate this. What is my good enough precision.

![magnifying glass](https://images.unsplash.com/photo-1457524461416-8796b6d23efb?dpr=1&auto=format&crop=entropy&fit=crop&w=1500&h=1000&q=80&cs=tinysrgb)

Also, `Rgb` and `Hsl` may not need the same constant. For the sake of precision, I added a method `StrictlyEquals` set to the default value of `.0001`.

Feel free to share your thoughts about this here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.