def Action_adapter(a, max_action):
    # from [-1,1] to [-max,max]
    return a * max_action


def Action_t_relu6_adapter_reverse(act, max_action):
    # from [0, max] to [0,6]
    return (act * 6.0) / max_action


def Action_t_relu6_adapter(a, max_action):
    # from [0,6] to [0,max]
    return (a/6.0) * max_action


def Action_adapter_reverse(act, max_action):
    # from [-max,max] to [-1,1]
    return act / max_action


def Act_t_correction(act_t):
    # from[-1,1] to [0,1]
    return abs(act_t)
