MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / Dist

Method Dist

LuaSTGPlus/GameObjectPool.cpp:828–838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

826}
827
828bool GameObjectPool::Dist(size_t idA, size_t idB, double& out)LNOEXCEPT
829{
830 GameObject* pA = m_ObjectPool.Data(idA);
831 GameObject* pB = m_ObjectPool.Data(idB);
832 if (!pA || !pB)
833 return false;
834 lua_Number dx = pB->x - pA->x;
835 lua_Number dy = pB->y - pA->y;
836 out = sqrt(dx*dx + dy*dy);
837 return true;
838}
839
840bool GameObjectPool::GetV(size_t id, double& v, double& a)LNOEXCEPT
841{

Callers

nothing calls this directly

Calls 1

DataMethod · 0.80

Tested by

no test coverage detected