Open-Infra-Platform
Open-Infra-Platform copied to clipboard
[REF] Double comparison with DoubleEqual (?) instead of != and ==
Thing which is being refactored Implement a utility function in either BlueFramework or somewhere else to compare doubles safely for equality or use some existing library function.
Steps
- [x] Decide for one function for double comparison.
- [x] Implement it or include/link the external library.
- [ ] Find all double comparisons using
==
or!=
in the code
Example https://github.com/tumcms/Open-Infra-Platform/blob/ed442c345931f4897a6603402face849b24d6b41/Core/src/IfcGeometryConverter/ProfileConverter.h#L543-L549
Suggestion: have a function within GeomSettings()
that then links to whatever library / function we decide for. But the students can already start implementing.
There are a lot of good reads on the webs.
I still think that the precision provided in the IFC file - see attribute Precision
here - should be used for defining the epsilon
.
@Elvira2227 : now that #303 is merged, this issue can be addressed:
- try and find such comparison as stated above
- use
areEqual
with corresponding parameters