It's OK to compare floating-points for equality
(lisyarus.github.io)
from soc@programming.dev to programming@programming.dev on 16 Apr 11:05
https://programming.dev/post/48902840
from soc@programming.dev to programming@programming.dev on 16 Apr 11:05
https://programming.dev/post/48902840
#programming
threaded - newest
I mean, something like
inbetween(target - cellRadius, target + cellRadius), no?And of course you first (and generally) convert the floating points to units you can actually work with, why is this even a question? Anyone who knew KSP as more than a rocket explosion simulator, learned that lession long ago from the Kraken.
That’s one case study. He lists many more where throwing an epsilon at a floating point problem is the wrong solution.
Headline: says something. (That is obviously not true and just clickbaiting)
Instant disclaimer: the headline is not good, it should be instead “don’t do this other thing”.
Later in the article: how do we avoid doing the thing I told you not to do? By doing what I told you not to do.
The dude may be correct (idk, haven’t bothered reading the rest of the article), but he doesn’t know how to write/communicate. I don’t believe he’s respecting my time. Just tell in the title what you actually want to talk about.