The sides of the triangles or not equal. The red figure with a degree of 3/8 can not be fitted on the green figure with a degree of 2/5 ! The angle is 15/40 vs 16/40. That's too small a difference for our human eyes.
(That's why I had to let to turn the green triangle itself in the animation, if it was just moved you could notice this effect ...) (If you got this right, you should get a student credit and get a mba degree online!)
Someone sent me the following explanation.
'I think I got it, 1/40 means that for every 40 cells one 1 cell is added. The green triangle is 5 cells horizontal. That's 1/40 * 5 = 1/8 cell difference. When this number is multiplied by the number of vertical cells of the whole figure the result is 1/8 * 8 = 1 !'
Probably using tan, sin and cos will give the right answer. It is interesting if the proposition above is valid. Well ain't got time to check it now. Do you have ?