mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-02 21:02:13 +00:00
In the previous implementation the fractions of the two turns where compared first using operator< and then tested for equality using math::equals; the consequence of this implementation is that it could be possible to have two turns t1 and t2 whose fractions satisfied both operator< and math::equals, which lead to the possibility of having both less(t1, t2) and less(t2, t1) true; this behavior for less is wrong and has produced failures on various compilers (especially when sorting); The solution is to rearrange the code in the less functor so that math::equals for the two fractions is checked first, that is before the operator< is called; this makes the outcomes of less(t1, t2) and less(t2, t1) always consistent with each other;