inSelection method

bool inSelection(
  1. Selection selection
)

Implementation

bool inSelection(Selection selection) {
  if (selection.start.path <= selection.end.path) {
    return selection.start.path <= path && path <= selection.end.path;
  } else {
    return selection.end.path <= path && path <= selection.start.path;
  }
}