Khan/khan-exercises — Issue #12719: Telling time 2 - Can't see everything
Author: KhanBugz
Created: 2012-02-01 03:40:03+00:00
State: open
Labels: chrome, not-showing, win7

Reporter: gabeyld@msn.com

Instead of a clock face to be manipulated, I see some code:
"function movePartnerPoint(a){var b=a.x,c=a.y,d=a.point,e=a.outerPoint,f=a.isOuterPoint,g=e.constraints.fixedDistance.dist/d.constraints.fixedDistance.dist;return f?(g=1/g,d.setCoord([b*g,c*g]),e.setCoord([b,c])):(d.setCoord([b,c]),e.setCoord([b*g,c*g])),d.updateLineEnds(),!0}init({range:[[-4,4],[-4,4]],scale:45});var clockRadius=3.75,minuteSnapPoints=12,hourSnapPoints=720/MINUTE_INCREMENT,outerPointRadius=clockRadius*1.01,minuteRadius=clockRadius*.6,hourRadius=clockRadius*.45;minuteStartAngle=90,hourStartAngle=60,minuteSnapDegrees=360/minuteSnapPoints,hourSnapDegrees=360/hourSnapPoints;var clock=addAnalogClock({radius:clockRadius,minuteTicks:hourSnapPoints});clock.draw(),addMouseLayer(),minutePoint=addMovablePoint({coord:polar(minuteRadius,minuteStartAngle),constraints:{fixedDistance:{dist:minuteRadius,point:[0,0],snapPoints:12}},onMove:function(a,b){return movePartnerPoint({x:a,y:b,point:this,outerPoint:outerMinutePoint,isOuterPoint:!1})},normalStyle:{fill:ORANGE,stroke:ORANGE},highlightStyle:{fill:ORANGE,stroke:ORANGE}}),outerMinutePoint=addMovablePoint({coord:polar(outerPointRadius,minuteStartAngle),constraints:{fixedDistance:{dist:outerPointRadius,point:[0,0],snapPoints:12}},onMove:function(a,b){return movePartnerPoint({x:a,y:b,point:minutePoint,outerPoint:this,isOuterPoint:!0})},normalStyle:{fill:ORANGE,stroke:ORANGE},highlightStyle:{fill:ORANGE,stroke:ORANGE}}),hourPoint=addMovablePoint({coord:polar(hourRadius,hourStartAngle),constraints:{fixedDistance:{dist:hourRadius,point:[0,0],snapPoints:hourSnapPoints}},onMove:function(a,b){return movePartnerPoint({x:a,y:b,point:this,outerPoint:outerHourPoint,isOuterPoint:!1})},normalStyle:{fill:BLUE,stroke:BLUE},highlightStyle:{fill:BLUE,stroke:BLUE}}),outerHourPoint=addMovablePoint({coord:polar(outerPointRadius,hourStartAngle),constraints:{fixedDistance:{dist:outerPointRadius,point:[0,0],snapPoints:hourSnapPoints}},onMove:function(a,b){return movePartnerPoint({x:a,y:b,point:hourPoint,outerPoint:this,isOuterPoint:!0})},normalStyle:{fill:BLUE,stroke:BLUE},highlightStyle:{fill:BLUE,stroke:BLUE}}),minuteHand=addMovableLineSegment({pointA:minutePoint,coordZ:[0,0],fixed:!0,normalStyle:{stroke:ORANGE,"stroke-width":10}}),hourHand=addMovableLineSegment({pointA:hourPoint,coordZ:[0,0],fixed:!0,normalStyle:{stroke:BLUE,"stroke-width":10}}),centerPoint=addMovablePoint({coord:[0,0],constraints:{fixed:!0},normalStyle:{fill:"#fff",stroke:"#000","stroke-width":2}}),correctMinuteAngle=timeToDegrees(MINUTE),correctHourAngle=timeToDegrees(5*(HOUR+MINUTE/60)),correctMinuteAngle=roundToNearest(minuteSnapDegrees,correctMinuteAngle),correctHourAngle=roundToNearest(hourSnapDegrees,correctHourAngle)
Drag the two hands so the clock reads HOUR:NICE_MINUTE.
[minutePoint.coord,hourPoint.coord]
var a=cartToPolar(guess[0])[1],b=cartToPolar(guess[1])[1];return a=roundToNearest(minuteSnapDegrees,a),b=roundToNearest(hourSnapDegrees,b),a===minuteStartAngle&&b===hourStartAngle?"":a===correctMinuteAngle&&b===correctHourAngle
minutePoint.moveTo(guess[0][0],guess[0][1],!0),hourPoint.moveTo(guess[1][0],guess[1][1],!0)"

[telling_time_2.html?seed=94&problem=set-hands-30-minutes](http://sandcastle.khanacademy.org/media/castles/Khan:master/exercises/telling_time_2.html?seed=94&problem=set-hands-30-minutes&debug)

[Answer timeline](http://sandcastle.khanacademy.org/media/castles/Khan:master/exercises/telling_time_2.html?seed=94&problem=set-hands-30-minutes&debug&activity=undefined)

undefined

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7

MathJax is loaded, ready, queue length: 0