-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add handling for float types, and also for %v (#3263)
This PR includes the changes to `ufmt.Sprintf()` from #2868 as well as another branch where I had added support for `%v`. These changes add support for a variety of float formatting options to Sprintf, as well as support for the %v flag to automatically chose a default representation for a given type. Tests were added for these additions. This PR is needed for the PRNG PR (#2868) to be fully functional, as the generators include some built in statistical examples/tests which will not function without `ufmt.Sprintf()` support for floats. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs </details> --------- Co-authored-by: Nathan Toups <[email protected]>
- Loading branch information
Showing
2 changed files
with
102 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters