function d2r, degs, arcsec=arcsec ;+ ; NAME: ; d2r ; ; PURPOSE: ; convert degrees to radians using the fewest characters ; typed on the command line. this function is for lazy ; typists. ; ; INPUTS: ; degs - angle in degrees (or in arcseconds if /arcsec). ; ; KEYWORDS: ; arcsec - set if input angle is in arcseconds. ; ; OUTPUTS: ; the angle in radians. output type is always double. ; ; EXAMPLE: ; angle = d2r(0.151, /arcsec) ; ; MODIFICATION HISTORY: ; written 2005-11-11 by mikewong ;- return, !dpi/180d * (keyword_set(arcsec) ? degs / 3600d : degs) end