Circular arc approximation by cubic Bezier curve: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 16: | Line 16: | ||
r = M.Dist(A); | r = M.Dist(A); | ||
d = Math.sqrt((ax+bx)*(ax+bx) + (ay+by)*(ay+by)); | d = Math.sqrt((ax+bx)*(ax+bx) + (ay+by)*(ay+by)); | ||
if (JXG.Math.Geometry.rad(A,M,B)>Math.PI) { d *= 1; } | if (JXG.Math.Geometry.rad(A,M,B)>Math.PI) { d *= -1; } | ||
if (Math.abs(by-ay)>JXG.Math.eps) { | if (Math.abs(by-ay)>JXG.Math.eps) { |