Skip to content

docs: clarify Float.toInt truncates toward zero, not rounds#747

Open
mitnick2012 wants to merge 1 commit into
caffeinelabs:masterfrom
mitnick2012:fix/float-toInt-doc-truncation
Open

docs: clarify Float.toInt truncates toward zero, not rounds#747
mitnick2012 wants to merge 1 commit into
caffeinelabs:masterfrom
mitnick2012:fix/float-toInt-doc-truncation

Conversation

@mitnick2012

Copy link
Copy Markdown

Float.toInt currently gives no hint that it truncates rather than rounds. This aligns its wording with toInt64 (which already says "by truncating") and adds two examples showing the behavior for fractional and negative values.

Float.toInt currently gives no hint that it truncates rather than rounds.
This aligns its wording with toInt64 (which already says "by truncating")
and adds two examples showing the behavior for fractional and negative values.
@mitnick2012 mitnick2012 requested a review from a team as a code owner June 11, 2026 11:03
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.

1 participant