3 ms·
>Here's a random selection: https://github.com/mockingbirdnest/Principia/blob/master/physics/geopotential.hpp https://github.com/mockingbirdnest/Principia/blob/
by orbital-decay 7y ago
>Here's a random selection: https://github.com/mockingbirdnest/Principia/blob/master/physics/geopotential.hpp https://github.com/mockingbirdnest/Principia/blob/master/phy...
I don't think r² as a variable name is a good idea. It may look natural for some (including myself), but for others it implies a function while not being one.
- fluffything 7y agoI don't see how r² is worse than r2 or r_2 or r_to_the_power_of_two..
- nixpulvis 7y agoInteresting... r² could be viewed as both an identifier and an operation. r² = r^2; A = πr²
- db48x 7y agoYea, that's fair; it's definitely one of the more surprising things that they do. On the other hand, it's pretty common to pass around squared values that the math says that you ought to have taken the root of, when you know how long it takes to do that root. You're going to end up with some kind of convention for it, so it might as well be a short one.