def remap(degreeinput,degreemin,degreemax,dmxmin=0,dmxmax=65536):
    """
    Convert the degree value to a 16 bit dmx number.
    """
    DMXvalue = ((degreeinput - degreemin) * (dmxmax-dmxmin) / (degreemax - degreemin) + dmxmin)
    return DMXvalue