aloisdg / aloisdg/Licorne

What precision is good enough?

Aperta
#12 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement help wanted
Lingua principale
C#
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.