https://github.com/marius-team/quake/blob/main/src/cpp/include/geometry.h#L378-L386 The code implementation is different from the formula in the paper