Curly braces

The JavaScript code

varbrd=JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-4,4,4,-4],keepaspectratio:true,axis:true});varA=brd.create('point',[-3,3]);varB=brd.create('point',[3,-2]);varline=brd.create('segment',[A,B]);varheight=0.5;// height of the curly brace// Curly bracevarcrl=brd.create('curve',[[0],[0]],{strokeWidth:1,strokeColor:'black'});crl.bezierDegree=3;crl.updateDataArray=function(){vard=[B.X()-A.X(),B.Y()-A.Y()],dl=Math.sqrt(d[0]*d[0]+d[1]*d[1]),mid=[(A.X()+B.X())*0.5,(A.Y()+B.Y())*0.5];d[0]*=height/dl;d[1]*=height/dl;this.dataX=[A.X(),A.X()-d[1],mid[0],mid[0]-d[1],mid[0],B.X()-d[1],B.X()];this.dataY=[A.Y(),A.Y()+d[0],mid[1],mid[1]+d[0],mid[1],B.Y()+d[0],B.Y()];};// Textvartxt=brd.create('text',[function(){vard=[B.X()-A.X(),B.Y()-A.Y()],dl=Math.sqrt(d[0]*d[0]+d[1]*d[1]),mid=(A.X()+B.X())*0.5;d[1]*=height/dl;returnmid-d[1]+0.1;},function(){vard=[B.X()-A.X(),B.Y()-A.Y()],dl=Math.sqrt(d[0]*d[0]+d[1]*d[1]),mid=(A.Y()+B.Y())*0.5;d[0]*=height/dl;returnmid+d[0]+0.1;},function(){return"length="+B.Dist(A).toFixed(2);}]);brd.update();// This update is necessary to call updateDataArray the first time.