sightEndlessCapLap function

int sightEndlessCapLap(
  1. SightStep d
)

A volta em que o andamento da figura d chega ao da peça: o bpm sobe sightEndlessTempoPercent% por volta até o concertBpm.

Implementation

int sightEndlessCapLap(SightStep d) {
  final bpm = d.bpm;
  final concert = d.concertBpm ?? bpm;
  if (concert <= bpm) return 0;
  final step = sightEndlessTempoPercent * bpm;
  return ((concert - bpm) * 100 + step - 1) ~/ step;
}