Skip to content

Fix formatting of whole number doubles - #1290

Merged
flyingmutant merged 1 commit into
cmus:masterfrom
gavtroy:format-double-fix
Nov 4, 2023
Merged

flyingmutant merged 1 commit into
cmus:masterfrom
gavtroy:format-double-fix

Conversation

@gavtroy

@gavtroy gavtroy commented Aug 21, 2023

Copy link
Copy Markdown
Collaborator

Print for example "5.0" instead of "5." with an awkward trailing decimal point.

This formatter is only used for printing replay gain info (rg_track_gain etc.) which by default we don't.

@flyingmutant

Copy link
Copy Markdown
Member

Isn't just %f enough to get this?

@gavtroy

gavtroy commented Aug 23, 2023

Copy link
Copy Markdown
Collaborator Author

If you meant %g then the short answer is yes.

In particular this avoids whole numbers printing with an extra "." at
the end.
@flyingmutant
flyingmutant merged commit 7a81258 into cmus:master Nov 4, 2023
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.

2 participants