Skip to content
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

langref: clarify functionality of the round builtin #19503

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

torque
Copy link
Contributor

@torque torque commented Mar 31, 2024

Questions regarding the behavior of this have shown up in the IRC channel more than once, and I think the current wording is misleading. I also added a test, which I think demonstrates the described behavior fairly unambiguously.

@torque torque force-pushed the round-builtin-langref branch 2 times, most recently from 0f53a1c to c2f6626 Compare March 31, 2024 23:13
doc/langref.html.in Outdated Show resolved Hide resolved
@balvaldyr
Copy link

Please also update the identical comment for the std.math.round() function!

@torque
Copy link
Contributor Author

torque commented Apr 30, 2024

thanks for the note, will do when I get a chance.

@torque torque force-pushed the round-builtin-langref branch from 79132eb to d4d75ba Compare May 1, 2024 00:50
Copy link
Member

@andrewrk andrewrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a rebase; lang ref now has code snippets in separate files (this won't compile anymore)

@torque torque force-pushed the round-builtin-langref branch from d4d75ba to b015b97 Compare August 12, 2024 23:45
A test has also been added to demonstrate the expected behavior.
@torque torque force-pushed the round-builtin-langref branch from b015b97 to d5a2bf8 Compare August 12, 2024 23:49
@torque
Copy link
Contributor Author

torque commented Aug 12, 2024

I've rebased it and it looks good to me locally.

@torque torque force-pushed the round-builtin-langref branch from d5a2bf8 to 5cdd4e4 Compare August 12, 2024 23:51
@andrewrk andrewrk merged commit eb7f318 into ziglang:master Aug 14, 2024
10 checks passed
SammyJames pushed a commit to SammyJames/zig that referenced this pull request Aug 15, 2024
A test has also been added to demonstrate the expected behavior.

* std.math: update round doc comment to match the builtin
richerfu pushed a commit to richerfu/zig that referenced this pull request Oct 28, 2024
A test has also been added to demonstrate the expected behavior.

* std.math: update round doc comment to match the builtin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants