The problems with Doubles and Floats are already well documented, but sometimes we fall into the trap again.
In short, the representation of a real number1 in Float and Double is not precise2.
Normally, I am well aware of this limitation, but sometimes I get tripped up by already receiving Doubles and Floats as input.
In this case, it involved Geometrie coordinates, in doubles of course.
The following Unit Test shows the problem:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters