Arc length: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 9: | Line 9: | ||
var i; | var i; | ||
var m = n.Value(); | var m = n.Value(); | ||
m = Math. | m = Math.floor(m); | ||
var d = (5-0)/m; | var d = (5-0)/m; | ||
this.dataX = []; | this.dataX = []; | ||
Line 15: | Line 15: | ||
this.dataX[0] = 0.0; | this.dataX[0] = 0.0; | ||
this.dataY[0] = f(0.0); | this.dataY[0] = f(0.0); | ||
for (i=1;i<m;i++) { | for (i=1;i<=m;i++) { | ||
this.dataX.push(0.0+i*d); | this.dataX.push(0.0+i*d); | ||
this.dataY.push(f(0.0+(i-1)*d)); | this.dataY.push(f(0.0+(i-1)*d)); |