@rickosborne/hexgrid
Version:
Rick Osborne's collection of hexagonal grid-related code.
13 lines (12 loc) • 445 B
JavaScript
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
const hexesWithin = /* @__PURE__ */ __name((radius) => {
if (radius < 0 || !Number.isSafeInteger(radius)) {
throw new RangeError("hexesWithin expects a positive integer radius");
}
return 1 + 3 * radius * (radius + 1);
}, "hexesWithin");
export {
hexesWithin
};
//# sourceMappingURL=hexes-within.mjs.map