Another solution could be this...

Click image for larger version. 

Name:	triangle_ch_02.png 
Views:	135 
Size:	36.4 KB 
ID:	122757

this way you don't need to do the math.