Golden Thumb

remote tutor & close friend of chosen kids
proud dad of an awesome daughter


(2019-10-06 20:26:02) 下一个


Sometimes Kids Just Need More Help

Angie finished her homework which was drawing the game board. Everything is good so she was provided her first challenge: centre the board horizontally on the blue canvas. She knew how to move the grid left and right, but couldn’t find the right formula that worked. Her best try got left margin the hardcoded value 200 which looked pretty good. However she seemed unable to move on with a solution.

I made a screenshot and pasted onto TextEdit, trying to explain further. With the width of canvas 736 and the width of the grid 320 marked up in red, Angie calculated with pencil and paper and got a = 208.

what should a be to put the grid in the middle horizontally?

“Where does your 208 come from, Angie?”, I asked. She typed the following.

(736 - 320) / 2



[ 打印 ]
阅读 ()评论 (0)