-
Notifications
You must be signed in to change notification settings - Fork 13.3k
libcore: Rename float constants for consistency. #16370
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
Conversation
Thanks for doing this! It might also be worth changing constants like |
I don't think it's appropriate to do this unless you rename all the other constants too. What are you going to rename |
How about TAU? |
For the fractions, I think For Edit: Actually, having |
@forticulous I doubt we'll see (update: I worded that too strongly, especially given the number of core team members on #15248 who explicitly said that they did not object to tau. Still, it was a contentious PR.) |
@ruud-v-a Sorry for the delay in getting back to you about this. I agree with @kballard that we need to consider the naming of these constants in a more global way, since the current names are meant to reflect the names in C. We're going through a "stabilization" process where we mark If you'd like to help with this effort, you could start a thread on discuss with a broader proposal and rationale. Otherwise, the team will be dealing with floats soon and we'll take this inconsistency into account. I'm going to close the PR for now, but thanks for bringing this to our attention! |
I created a topic here. |
@ruud-v-a Awesome, thanks so much for leading the charge on this! |
feat: Hover for literals showing additional value information
Rename
f32::consts::PI_2
andf64::consts::PI_2
toTWO_PI
for consistency withFloat::two_pi
. This deprecatesPI_2
as suggested by @aturon. There are still functions inFloat
that have digits in their name, but I think it is hard to avoid that.