Difference between revisions of "Bearing"
From JSXGraph Wiki
Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
A WASSERMANN (talk | contribs) |
||
Line 9: | Line 9: | ||
var p = brd.create('glider',[-1,0.5,c],{name:'drag me'}); | var p = brd.create('glider',[-1,0.5,c],{name:'drag me'}); | ||
brd.addHook(function(){ | brd.addHook(function(){ | ||
− | document.getElementById('degrees').value = (Math.atan2(p. | + | document.getElementById('degrees').value = (Math.atan2(p.Y(),p.X())*180/Math.PI).toFixed(1); |
}); | }); | ||
</jsxgraph> | </jsxgraph> |
Revision as of 18:09, 16 June 2010