smth smth remove outliers stolen from nyx

This commit is contained in:
KadeDev 2021-03-31 16:33:40 -07:00
parent 6f63976699
commit 2442602e49

View File

@ -2171,6 +2171,13 @@ class PlayState extends MusicBeatState
if (msTiming >= 0.03 && SONG.song.contains('offsetTest')) if (msTiming >= 0.03 && SONG.song.contains('offsetTest'))
{ {
//Remove Outliers
hits.shift();
hits.shift();
hits.shift();
hits.pop();
hits.pop();
hits.pop();
hits.push(msTiming); hits.push(msTiming);
var total = 0.0; var total = 0.0;
@ -2178,6 +2185,8 @@ class PlayState extends MusicBeatState
for(i in hits) for(i in hits)
total += i; total += i;
offsetTest = truncateFloat(total / hits.length,2); offsetTest = truncateFloat(total / hits.length,2);
} }