factored out private radians() and triangle() functions.