ianmackenzie / elm-geometry

2D/3D geometry package for Elm
Mozilla Public License 2.0
183 stars 26 forks source link

Return Maybe values from Arc2d.centerPoint etc. #136

Open ianmackenzie opened 4 years ago

ianmackenzie commented 4 years ago

It would be safest for functions like Arc2d.centerPoint, Arc2d.radius and corresponding functions in Arc3d (including 3D-specific ones like Arc3d.normalAxis) to return Maybe values when the arc swept angle is zero (the arc is actually a straight line). Currently they just return infinite values which are not super useful, and it's easy to forget or not realize that this is the case.