h3Distance method

  1. @override
int h3Distance(
  1. BigInt origin,
  2. BigInt destination
)
override

Get the grid distance between two hex indexes. This function may fail to find the distance between two indexes if they are very far apart or on opposite sides of a pentagon.

Returns -1 when result can't be calculated

Implementation

@override
int h3Distance(BigInt origin, BigInt destination) {
  return _h3c.h3Distance(origin.toInt(), destination.toInt());
}