|
|
|
|
|
by alkonaut
98 days ago
|
|
I have a linter in my code that shouts at me if I use exact equality for floats. But I regret not making an exception for the constant zero, because it's one of the cases where you probably should accept it. I.e. if (f != 0.0) {...} |
|
The linter wouldn't know where f came from, so it should flag all floating point equality cases, and have some way that you can annotate it for "yeah this one is okay."