adding helper functions, decimal numbers and sqrt#112
Open
kempeng wants to merge 6 commits intoshopspring:masterfrom
Open
adding helper functions, decimal numbers and sqrt#112kempeng wants to merge 6 commits intoshopspring:masterfrom
kempeng wants to merge 6 commits intoshopspring:masterfrom
Conversation
helpers.go defines several helper functions for the create of new decimal's from int's that make code using decimal a bit easier to read. Further more it implements a.Max() and a.Min() functions in the same fashion as other arithmetic functions like Add & Sub. (the decimal package already implements Max(d, d2....) and Min(), but these two helper functions are complementary to them. Finally a.Float() is a convenience function for a.Float64() that ignore the precise bool, allowing inline use of the float conversion function
Zero.go defines convenience functions for testing decimal values with the zero value. These functions make code using decimal easier to read in my opinion. EqualZero() could be renamed into IsZero()
Author
|
Can the files I submitted be added to the master? |
Author
|
can these files merged into the master? |
rafa-acioly
reviewed
Oct 8, 2018
|
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
helper functions, predefined decimal numbers and added sqrt function