UNPKG

@rickosborne/hexgrid

Version:

Rick Osborne's collection of hexagonal grid-related code.

12 lines (11 loc) 443 B
var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); import { cubeSubtract } from "./cube-subtract.mjs"; const cubeDistance = /* @__PURE__ */ __name((left, right) => { const { q, r, s } = cubeSubtract(left, right); return Math.max(Math.abs(q) + Math.abs(r) + Math.abs(s)); }, "cubeDistance"); export { cubeDistance }; //# sourceMappingURL=cube-distance.mjs.map