UNPKG

@caveworld/honeycomb-grid

Version:
5 lines (4 loc) 437 B
import { CubeCoordinates, HexPrototype, OffsetCoordinates } from '../types'; export declare const offsetToCubePointy: (col: number, row: number, offset: number) => CubeCoordinates; export declare const offsetToCubeFlat: (col: number, row: number, offset: number) => CubeCoordinates; export declare const offsetToCube: ({ offset, isPointy }: Pick<HexPrototype, 'offset' | 'isPointy'>, { col, row }: OffsetCoordinates) => CubeCoordinates;