added angleZ to better support 3d trigonometry