Files
lan-manager/web/node_modules/@antv/g-canvas/lib/util/in-stroke/arc.js
openclaw 0a5f6a8047 Initial commit: Lan-manager project code
- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs

Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
2026-04-20 00:52:58 +08:00

16 lines
589 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var util_1 = require("../util");
function arc(cx, cy, r, startAngle, endAngle, lineWidth, x, y) {
var angle = (Math.atan2(y - cy, x - cx) + Math.PI * 2) % (Math.PI * 2); // 转换到 0 - 2 * Math.PI 之间
if (angle < startAngle || angle > endAngle) {
return false;
}
var point = {
x: cx + r * Math.cos(angle),
y: cy + r * Math.sin(angle),
};
return util_1.distance(point.x, point.y, x, y) <= lineWidth / 2;
}
exports.default = arc;
//# sourceMappingURL=arc.js.map