Calculations in condata plugin
Locked
Plugins
-
Recently i’ve taken some code from this plugin to my flhook (based on 1.5.5 version), and noticed strange lines:```
ConData[iClientID].iPingFluctuation +=
(uint)sqrt((double)pow(((float)(*it) - (float)iLastPing),2));int iDiff = (int)sqrt(pow((long double)((int)iTimeDiff - (int)iTimestampDiff),2));
Math never was my strong point, but why using this long float expressions instead of fast
iFluct = abs((*it) - iLastPing);**edit**:``` EXPORT void __stdcall SPObjUpdate(struct SSPObjUpdateInfo const &ui, unsigned int iClientID) { returncode = DEFAULT_RETURNCODE; // lag detection IObjInspectImpl *ins = HkGetInspect(iClientID); if(!ins) return; // ??? 8[ <...> } ```Is this code nessesary? Just want to optimize everything that can be optimized ;D