Closed beecksche closed 5 years ago
Can you say more about what this change is trying to accomplish?
First, to exclude the initialization of the variable from the for
loop. What I think is more readable and also may improve the performance.
Secondly, for possible future features, where pi is necessary, only one definition is available.
I think any compiler will generate the same code before/after your change except maybe if all optimizations are turned off.
I see no real downside to it, other than the risk that comes with any code change.
However since this seems to be merely a stylistic preference without substantial benefit, I am declining this PR.
Instead of using local pi variables, a global constant is used.