def remap(value, oldMin, oldMax, newMin, newMax):
    """
    Remaps the value to a new min and max value
    Args:
        value: value to remap
        oldMin: old min of range
        oldMax: old max of range
        newMin: new min of range
        newMax: new max of range

    Returns:
        The remapped value in the new range
    """
    return newMin + (((value - oldMin) / (oldMax - oldMin)) * (newMax - newMin))