Coordinate system for hexagonal grids.

Features

  • Representation of hexagonal grids using axial and cube coordinates.
  • Conversion between axial and cube coordinates.
  • Calculation of distances between hexagonal grid points.
  • Neighboring hexagon retrieval.

Getting started

To use this package, add it as a dependency in your pubspec.yaml file:

dependencies:
  hex_coordinate: ^1.0.0

Usage

Import the package in your Dart file:

import 'package:hex_coordinate/hex_coordinate.dart';

Then, you can create hexagonal grid points and perform various operations:

   final a = AxialCoordinate(1, 2);
   final c = a.toCube();

Libraries

hex_coordinate
Support for doing something awesome.