MCPcopy Create free account
hub / github.com/axmolengine/axmol / distance

Method distance

tests/live2d-tests/Source/TouchManager.cpp:169–172  ·  view source on GitHub ↗

* 点1から点2への距離を求める * @param p1x * @param p1y * @param p2x * @param p2y * @return */

Source from the content-addressed store, hash-verified

167 * @return
168 */
169float TouchManager::distance(float x1, float y1, float x2, float y2)
170{
171 return (float)sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
172}
173
174/*
175 * 二つの値から、移動量を求める。

Callers 2

updateStateMethod · 0.45
updateMethod · 0.45

Calls 1

sqrtFunction · 0.50

Tested by 2

updateStateMethod · 0.36
updateMethod · 0.36