UNPKG

@rickosborne/hexgrid

Version:

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

18 lines (17 loc) 672 B
var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); const doubleHeightDistance = /* @__PURE__ */ __name((left, right) => { const dCol = left.col - right.col; const dRow = left.row - right.row; return dCol + Math.max(0, (dRow - dCol) / 2); }, "doubleHeightDistance"); const doubleWidthDistance = /* @__PURE__ */ __name((left, right) => { const dCol = left.col - right.col; const dRow = left.row - right.row; return dRow + Math.max(0, (dCol - dRow) / 2); }, "doubleWidthDistance"); export { doubleHeightDistance, doubleWidthDistance }; //# sourceMappingURL=double-distance.mjs.map