MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / isInsideCircle

Method isInsideCircle

src/common/overlay/levelRenderer/Area.js:622–624  ·  view source on GitHub ↗

* @function LevelRenderer.Tool.Areal.prototype.isInsideCircle * @description 图形 Circle 是否包含鼠标位置, true表示坐标处在图形内。 * @returns {boolean} 图形是否包含鼠标位置, true表示坐标处在图形内。

(x0, y0, r, x, y)

Source from the content-addressed store, hash-verified

620 * @returns {boolean} 图形是否包含鼠标位置, true表示坐标处在图形内。
621 */
622 isInsideCircle(x0, y0, r, x, y) {
623 return (x - x0) * (x - x0) + (y - y0) * (y - y0) < r * r;
624 }
625
626 /**
627 * @function LevelRenderer.Tool.Areal.prototype.isInsideSector

Callers 2

isInsideMethod · 0.95
_mathMethodMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected