getSampleCount method

int getSampleCount(
  1. double pathLength
)

Get number of samples to use for bend detection based on path length

Implementation

int getSampleCount(double pathLength) {
  return math.min(15, math.max(3, (pathLength / 30).ceil()));
}