Skip to content

PHP 8.4: Document RoundingMode - #4080

Merged
Girgias merged 3 commits into
php:masterfrom
Girgias:round-enum
Nov 20, 2024
Merged

PHP 8.4: Document RoundingMode#4080
Girgias merged 3 commits into
php:masterfrom
Girgias:round-enum

Conversation

@Girgias

Copy link
Copy Markdown
Member

Related to #3419 and php/phd#179

@AyeshAyesh added this to the PHP 8.4 milestone Nov 17, 2024

@TimWollaTimWolla left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall this LGTM for an initial version.

Comment threadreference/math/roundingmode.xml Outdated
Comment on lines +25 to +27
Round to the nearest integer.
If the decimal part is <literal>5</literal>,
round to the integer with the larger absolute value.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I assume you've taken all the description from the RFC?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The bit with the decimal part might need some adjustments either in the documentation for round() or in here, because round() supports rounding to a specified precision instead of integers.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I have indeed taken them from the RFC, yeah the whole round() semantics is... going to be a PITA.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I think I will merge as is, feel free to open an issue about the wording to keep track of it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
This was referenced Nov 17, 2024
@Girgias
Girgias merged commit e75557e into php:masterNov 20, 2024
@Girgias
Girgias deleted the round-enum branch November 20, 2024 17:05
KentarouTakeda added a commit to SakiTakamachi/doc-ja that referenced this pull request Mar 30, 2025
KentarouTakeda added a commit to php/doc-ja that referenced this pull request Mar 30, 2025
* RoundingMode Enumの翻訳を追加
* php/doc-en#4080 での一覧への追加を反映
---------
Co-authored-by: 武田 憲太郎 <takeda@youmind.jp>
Sign up for freeto 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.

3 participants

@Girgias@TimWolla@Ayesh