-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The TAU constant. #21308
Comments
This comment was originally written by @mezoni I agree too. E = 2.71828182845904523536028747135266250 // Neper number |
Added Library-Math, Area-Library, Triaged labels. |
Another options is to have the values as static constants on the double class. |
This comment was originally written by @si-robertson I'm not sure merging this request with a 32 month old "WontFix" bug was the best thing to do because this request has more or less been flatlined as a result. The TAU constant is still being requested so I believe reconsideration by the Dart team is warranted at this time. |
The arguments used to close the request the first time are still valid. Filing a new issue for the same change won't change that - this is a duplicate of issue #14. A solution would be to add a package, e.g., "math_constants", with all the constants you can think of. They don't have to be in dart:math. The expression (2.0*PI) is a compile-time constant in Dart, so there should be no performance penalty. |
This comment was originally written by @si-robertson I didn't say this request wasn't a duplicate, I said the Dart team should reconsider the request for TAU seeing as it's still being requested almost three years later. I wasn't even aware of issue #14 until this request was merged with it. If the Dart team is refusing to add this due to possible conflicts with user created libraries then that excuse also blocks any new APIs from being added to Dart in the future, right? What happens if someone has a FileLoader class in their library and the W3C one day decide to add a class with the same name to the standard JavaScript File API, how are the Dart team doing to handle that without breaking existing code. E, LN10, LOG2E, PI and all the others are also compile-time constants. |
The need for E, LN10, ... is higher than for Tau. While I remember how to get to Tau (= 2PI) I don't remember the values for E, LN10, ... Finally: http://www.thepimanifesto.com/ |
This issue was originally filed by @si-robertson
This is a small request for the TAU constant to be added to the math.dart library.
/**
* The TAU constant.
*/
const double TAU = 6.2831853071795864;
I'm sure most of the Dart team will understand why this would be useful :)
The text was updated successfully, but these errors were encountered: