simplefeatures
simplefeatures copied to clipboard
Use robust Line-Line intersection algorithm
The approach given in Line Segment Intersection Testing by Yong-Kang Zhu, Jun-Hai Yong, Guo-Qin Zheng promises to give a robust line/line intersection algorithm that has error at most 1 ULP.
It looks very interesting and involves some clever float64 manipulation.
The qd library has some existing double-double algorithms implemented, which may be useful: https://www.davidhbailey.com/dhbsoftware/