Replaced strange algebra with dot product. 

10 degrees is a completely arbitary constant I pulled from nowhere. Feel free to adjust this value.