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

Wrong Example output in pkg.go.dev #343

Closed
MurasakiNeko opened this issue Jan 4, 2024 · 2 comments
Closed

Wrong Example output in pkg.go.dev #343

MurasakiNeko opened this issue Jan 4, 2024 · 2 comments

Comments

@MurasakiNeko
Copy link

The output behind Example in RoundCeil, RoundDown, RoundFloor and RoundUp have a misstake in -1.454 part.

They should be:

NewFromFloat(-1.454).RoundCeil(1).String() // output: "-1.4"

NewFromFloat(-1.454).RoundDown(1).String() // output: "-1.4"

NewFromFloat(-1.454).RoundFloor(1).String() // output: "-1.5"

NewFromFloat(-1.454).RoundUp(1).String() // output: "-1.5"

https://go.dev/play/p/GGSfqR_wBDl

@mwoss
Copy link
Member

mwoss commented Jan 4, 2024

Thanks for the report! :3 This issue has been already fixed in #341

@mwoss
Copy link
Member

mwoss commented Jan 4, 2024

I guess documentation on pkg.go.dec will be automatically updated after next release :D

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

No branches or pull requests

2 participants