trap method

int trap(
  1. int pos
)

Implementation

int trap(int pos) {
  if (pos < 0) {
    return 0;
  } else if (pos > test!.bpmEntries!.length) {
    pos = test!.bpmEntries!.length - 10;
  }

  return pos;
}