diff --git a/include/geos/geom/CircularArc.h b/include/geos/geom/CircularArc.h index 699ebd5f1..283eaf3b0 100644 --- a/include/geos/geom/CircularArc.h +++ b/include/geos/geom/CircularArc.h @@ -92,6 +92,11 @@ class GEOS_DLL CircularArc { return 2*MATH_PI; } + /// Even Rouault: + /// potential optimization?: using crossproduct(p0 - center, p2 - center) = radius * radius * sin(angle) + /// could yield the result by just doing a single asin(), instead of 2 atan2() + /// actually one should also likely compute dotproduct(p0 - center, p2 - center) = radius * radius * cos(angle), + /// and thus angle = atan2(crossproduct(p0 - center, p2 - center) , dotproduct(p0 - center, p2 - center) ) auto t0 = theta0(); auto t2 = theta2();