()
| 35 | function deg2rad(degrees){ return DEGREE * degrees; } |
| 36 | |
| 37 | function drawTurtle(){ |
| 38 | var userPen = pen; // save pen state |
| 39 | if (visible){ |
| 40 | penUp(); _moveForward(5); penDown(); |
| 41 | _turn(-150); _moveForward(12); |
| 42 | _turn(-120); _moveForward(12); |
| 43 | _turn(-120); _moveForward(12); |
| 44 | _turn(30); |
| 45 | penUp(); _moveForward(-5); |
| 46 | if (userPen){ |
| 47 | penDown(); // restore pen state |
| 48 | } |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | function drawCircle(radius){ |
| 53 | // Math for this is from http://www.mathopenref.com/polygonradius.html |
no test coverage detected