Small part of the GeometricTool library. The whole library is availabe on: https://www.geometrictools.com