atLeastNCoordinatesOrNothing static method

List<Coordinate> atLeastNCoordinatesOrNothing(
  1. int n,
  2. List<Coordinate> c
)

Returns either the given coordinate array if its length is greater than the given amount, or an empty coordinate array.

Implementation

static List<Coordinate> atLeastNCoordinatesOrNothing(
    int n, List<Coordinate> c) {
  return c.length >= n ? c : <Coordinate>[];
}