Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

unit strings rounding todo #293

Merged
merged 2 commits into from
Oct 14, 2018
Merged

unit strings rounding todo #293

merged 2 commits into from
Oct 14, 2018

Conversation

NeuralSpaz
Copy link
Collaborator

changes the way physic units represented as string.
implement rounding for nanoAsString and microAsString.
add rounding test cases for nanoAsString.
add rounding test cases for microAsString.
fix examples for unit rounding.

implement rounding for nanoAsString and microAsString.
add rounding test cases for nanoAsString.
add rounding test cases for microAsString.
fix examples for unit rounding.
Copy link
Contributor

@maruel maruel left a comment

Choose a reason for hiding this comment

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

Only one additional line to get coverage back to 100% then lgtm

conn/physic/units.go Show resolved Hide resolved
conn/physic/units_test.go Show resolved Hide resolved
add test case for microAsString
change +1 to ++ in microAsString
@maruel
Copy link
Contributor

maruel commented Oct 14, 2018

gohci

@maruel
Copy link
Contributor

maruel commented Oct 14, 2018

I've confirmed with go test -bench=. that there is no significant performance change even with the additional conditions.

@maruel maruel merged commit d418b11 into google:master Oct 14, 2018
@maruel
Copy link
Contributor

maruel commented Oct 14, 2018

Thanks a lot for this excellent PR!

@NeuralSpaz
Copy link
Collaborator Author

Thank you for all your help with this, #294 and #292 :)
It is a great a project, and happy I can contribute to it.

@NeuralSpaz NeuralSpaz deleted the unitRounding branch October 14, 2018 17:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants