mirror of
https://gitea.tendokyu.moe/beerpsi/sinmai-mods.git
synced 2024-11-27 17:10:48 +01:00
15 lines
397 B
C#
15 lines
397 B
C#
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;
|
|
}
|
|
}
|