generateLabelForCoordinate function

String generateLabelForCoordinate(
  1. IntVector2 coordinate
)

Generates a label that represents a coordinate composed by the results of generateLabelForIndex for each axis concatenated.

Ex: IntVector2(0,0) will be A1.

See also:

Implementation

String generateLabelForCoordinate(IntVector2 coordinate) {
  final letter = generateLabelForIndex(Axis.horizontal, coordinate.dx);
  final number = generateLabelForIndex(Axis.vertical, coordinate.dy);
  return '$letter$number';
}