Ciremun / freedom

osu! difficulty changer & bot
MIT License
105 stars 27 forks source link

ar changer ignores dt ht ez #16

Open Ciremun opened 2 years ago

Ciremun commented 1 year ago

can be fixed using this

def ms_to_float(ms: int):
    return (1800 - ms) / 120 if ms > 1200 else (1200 - ms) / 150 + 5.0

def float_to_ms(ar: float):
    return 1800 - ar * 120 if ar <= 5.0 else 1200 - ar * 150 + 750.0

def apply_double_time(ar: float):
    return ms_to_ar(ar_to_ms(ar) / 1.5)

def compensate_double_time(ar: float):
    return max(ms_to_ar(ar_to_ms(ar) * 1.5), 0.0)