Difference between revisions of "Vertex equations of a quadratic function and it's inverse"

From JSXGraph Wiki
Jump to navigationJump to search
(Created page with "<jsxgraph width="300" height="300" box="box1"> (function() { var b = JXG.JSXGraph.initBoard('box1', {boundingbox: [-5, 5, 5, -5], grid:true}); var v = b.create('point', [0,0], {n...")
 
Line 8: Line 8:
 
                 var den = p.X()- v.X(),
 
                 var den = p.X()- v.X(),
 
                     a = (p.Y() - v.Y()) / (den * den);
 
                     a = (p.Y() - v.Y()) / (den * den);
                 return a * (x - v.X()) + v.Y();
+
                 return a * (x - v.X()) * (x - v.X()) + v.Y();
 
             }]);
 
             }]);
  

Revision as of 11:16, 16 December 2014