Crop Stomp: Implementation progress

This commit is contained in:
Jenny Crowe
2022-02-28 23:38:38 -07:00
parent 6c13d0efa2
commit daf19fae54
12 changed files with 1524 additions and 3 deletions

View File

@ -214,11 +214,21 @@ namespace RhythmHeavenMania
return a;
}
public float GetBeatFromPosition(float position, float startBeat, float length)
{
return Mathp.DeNormalize(position, startBeat, startBeat + length);
}
public float GetPositionFromMargin(float targetBeat, float margin)
{
return GetPositionFromBeat(targetBeat - margin, margin);
}
public float GetBeatFromPositionAndMargin(float position, float targetBeat, float margin)
{
return GetBeatFromPosition(position, targetBeat - margin, margin);
}
public float GetSongPosFromBeat(float beat)
{
return secPerBeat * beat;