I have a function that computes a point in 3d spaced based on a value in range [0, 1]. The problem I\'m facing is, that a binary floating-point number canno
When comparing floating point numbers you should check if they are close enough not exactly equal, for the reasons mentioned in other answers, something like: