MCPcopy Create free account
hub / github.com/cping/LGame / calcHitRatio

Method calcHitRatio

Java/Loon-Neo/src/loon/component/Desktop.java:945–958  ·  view source on GitHub ↗

根据点击点到组件中心的距离与组件半径估算是否有效命中 (去除UI图片大小的干扰因素,例如100x45的按钮里放了个实际像素80x20的按钮图,周围都是透明区域……) @param comp @param x @param y @return

(LComponent comp, float x, float y)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

findDeepComponentMethod · 0.95

Calls 6

sqrtMethod · 0.95
maxMethod · 0.95
getXMethod · 0.65
getWidthMethod · 0.65
getYMethod · 0.65
getHeightMethod · 0.65

Tested by

no test coverage detected