Documentation

Result is a PosInf value where PosInfty represents
infinite curvature or zero radius of curvature.

Curvature measures how curved the segment is at a point. One intuition
for the concept is how much you would turn the wheel when driving a car
along the curve. When the wheel is held straight there is zero curvature.
When turning a corner to the left we will have positive curvature. When
turning to the right we will have negative curvature.

Another way to measure this idea is to find the largest circle that we can
push up against the curve and have it touch (locally) at exactly the point
and not cross the curve. This is a tangent circle. The radius of that
circle is the "Radius of Curvature" and it is the reciprocal of curvature.
Note that if the circle is on the "left" of the curve, we have a positive
radius, and if it is to the right we have a negative radius. Straight
segments have an infinite radius which leads us to our representation. We
result in a pair of numerator and denominator so we can include infinity and
zero for both the radius and the curvature.