added generic deg2rad and rad2deg functions, and changed aoi_func to use generic
rad2deg