Skip to content

Commit

Permalink
ok i think maybe this is less clear initially, but better overall
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jun 7, 2020
1 parent 647dee3 commit c9aa736
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions src/Etterna/Globals/MinaCalc/Dependent/HD_PatternMods/OHT.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,34 +197,41 @@ struct OHTrillMod
}
}

inline auto operator()(const ItvHandInfo& itvhi) -> float
inline void set_pmod(const ItvHandInfo& itvhi)
{
if (oht_len > 0 && found_oht < max_trills_per_interval) {
foundyatrills.at(found_oht) = oht_len;
++found_oht;
}

_mw_oht_taps(oht_taps);

// no taps, no trills
if (itvhi.get_taps_windowi(window) == 0 ||
_mw_oht_taps.get_total_for_window(window) == 0) {
return neutral;
pmod = neutral;
return;
}

// full oht
if (itvhi.get_taps_windowi(window) ==
_mw_oht_taps.get_total_for_window(window)) {
return min_mod;
pmod = min_mod;
return;
}

badjuju(make_thing(itvhi.get_taps_nowf()));

pmod = base - badjuju.get_mean_of_window(window);
pmod = CalcClamp(pmod, min_mod, max_mod);
}

interval_end();
inline auto operator()(const ItvHandInfo& itvhi) -> float
{
if (oht_len > 0 && found_oht < max_trills_per_interval) {
foundyatrills.at(found_oht) = oht_len;
++found_oht;
}

_mw_oht_taps(oht_taps);

set_pmod(itvhi);

interval_end();
return pmod;
}

Expand Down

0 comments on commit c9aa736

Please sign in to comment.