What is going on here?
#1
https://github.com/assaultcube/AC/commit...b77918be6e

Why are half of those macros necessary?

It is much more clear in a formula to see 2*PI, rather than PI2. What is PI2? 2*PI? PI*2? PI^2? Think about when people are going through the code. If you know the macro, it's fine. If you have to keep referring to the macros, that's terrible.

Okay, so we have PI2. Why is PI2 not defined to be 2*PI? Why do we even need a PI2 macro?

The M_PI convention stems from see and is a clear way to define Pi for /everybody/. If you want to change PI now, you have to change:

PI, 2PI, RAD (at first glance).

Why make extra work for yourself? Does AC need that level of accuracy that you have to define PI2 as a float rather than 2*PI?

Also the commit name is "use only one constant for Pi, in case we ever need to change it"

The commit content doesn't match the commit title.

Don't get me wrong, I have been extremely critical of AC's source code for a while, but after actually working on source code I can see some things from stef's point of view. But this commit is just mind boggling...

Please help me to understand this change..
Reply
Thanks given by:
#2
Jokes are really not your thing, right?

As it turns out, we won't have to change Pi after all

(also: google M_PI and keep in mind on how many platforms and compilers our sources need to work)
Reply
Thanks given by:
#3
Geez, to think people have called ME a nerd before.
Reply
Thanks given by:
#4
[Image: pi-side.jpg]
Reply
Thanks given by: Boomhauer