sinmai-mods/MoreChartFormats/Simai/BpmChangeDataExtensions.cs

15 lines
397 B
C#
Raw Normal View History

2024-05-27 05:59:40 +02:00
using Manager;
namespace MoreChartFormats.Simai;
public static class BpmChangeDataExtensions
{
public static float SecondsPerBar(this BPMChangeData timing)
{
// Work under the assumption that 1 bar = 4 beats
// which is kinda true because the meter is always 4/4.
// 240 is 60 * 4.
return timing.bpm == 0 ? 0 : 240f / timing.bpm;
}
}