Difference between revisions of "Power functions"

From JSXGraph Wiki
Jump to: navigation, search
Line 14: Line 14:
 
var m = b.createElement('slider',[1.0,-4,9,1,10,1],{name:'m'});
 
var m = b.createElement('slider',[1.0,-4,9,1,10,1],{name:'m'});
 
b.createElement('curve', [function(t){ return t; }, function(t){ return b.pow(t,n.X()/m.X()); }, "t"],{strokeColor:'#ff0000'});
 
b.createElement('curve', [function(t){ return t; }, function(t){ return b.pow(t,n.X()/m.X()); }, "t"],{strokeColor:'#ff0000'});
//
+
.b.createElement('text',[3, function(){ return b.pow(3,n.X()/m.X()); }, function(){ return 'x^'+b.round(n.X()/m.X(),3); }]);
//
 
 
b.unsuspendUpdate();
 
b.unsuspendUpdate();
 
</script>  
 
</script>  

Revision as of 12:55, 15 December 2008