-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Tracking issue for core::{f32,f64}::consts::TAU #66770
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I don't think we should land this constant.
|
Naming aside, such a constant would be definitely useful. 2π couples tightly in the mathematical notation where |
Sources: Can someone other than me verify that I copied the number properly? Edit: Done by dtolnay. |
Unfortunately, the constant
Although I agree that having |
Our std lib is still unstable, we're willing to change it to a more canonical, sensible API if you wanna lead the way here :) |
Regardless of what C or other languages call their constants, I'd name this one TAU and not anything with PI. In the past five years, quite a few people have asked for a TAU constant. Looking at the amount of thumbs-ups at for example #66769 or rust-lang/rfcs#1486, it seems quite some people are in favour of TAU. |
Yeah, TAU is way, way better than TWO_PI. |
Can we make a decision for the name |
Normally we leave new library additions unstable for a few release cycles. This one seems very trivial though. In any case, some libs team member has to kick off FCP to get this stabilized, and they might not have the capacity at the moment. |
One thing worth discussing before stabilizing |
Only things like |
I have never coded with radians in Rust before, but I started a few weeks back and I instantly defined However, I'm really really in favor of moving the math constants to associated constants. I liked the more full on version of RFC 2700 that is linked above. Because now I have to look at my import/const define section at the top of the file to know what resolution I have available. And it's cumbersome to use 32 bit and 64 bit resolution math in the same module. As a result, I'm only in favor of stabilizing |
I don't have a hard opinion on whether math constants should live in @rust-lang/libs Does anyone of you want to start an FCP? From what I can tell, all questions have been resolved and this has been cooking on nightly for several cycles already. |
@rfcbot fcp merge |
Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
@SimonSapin @sfackler @withoutboats Friendly ping. Can this be stabilized before the next release? |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. The RFC will be merged soon. |
…tau, r=dtolnay Stabilize TAU constant. Closes rust-lang#66770.
Tracking issue for the
TAU
constant added in #66769.Before stabilization:
Wait for RFC that moves math constants fromstd::{f32,f64}::consts::..
to{f32,f64}::..
?The text was updated successfully, but these errors were encountered: