import math


def dec2deg(d, m, s):
    """
    Convert DEC (deg, arcmin, arcsec) to degree.
    """
    if (d >= 0):
        sign = 1.0
    else:
        sign = -1.0
    return sign * (math.fabs(d) + m/60.0 + s/3600.0)