问题描述
- 关于 unix valgrind 报Conditional jump or move depends on uninitialised value(s)
-
我的代码是:float dx = GetPositionX() - obj->GetPositionX();
float dy = GetPositionY() - obj->GetPositionY();
float dz = GetPositionZ() - obj->GetPositionZ();
float dist = sqrt((dx * dx) + (dy * dy) + (dz * dz));
return (dist > 0.0f ? dist : 0.0f);它报 return 这行 Conditional jump or move depends on uninitialised value(s),实在想不出来,怎么修改
时间: 2024-11-22 16:52:33