Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void projillum(short* wtab, int xdots, int ydots, double dec)
- {
- ...
- s = sin(-dtr(dec));
- x = -s * sin(th);
- y = cos(th);
- ...
- lon = (y == 0 && x == 0) ? 0.0 : rtd(atan2(y, x));
- }
- It's strange to expect 'x' and 'y' to exactly equal 0 after all these calculations.
- This suspicious code was found in CPU Identifying Tool project by PVS-Studio static code analyzer.
- Warning message is:
- V550 An odd precise comparison: x == 0. It's probably better to use a comparison with defined precision: fabs(A - B) '<' Epsilon. clock_dll sunalgo.cpp 155
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment