DecimalMath icon indicating copy to clipboard operation
DecimalMath copied to clipboard

Rounding suggestions

Open Corniel opened this issue 5 years ago • 2 comments

While searching for something unrelated to this repository, I stumbled on it somehow. And as I did something similar in the past (I like the clever idea to use Math.Sqrt() to speed up the Sqrt!) I couldn't resit the temptation to share my decimal rounding implementation: DecimalRound.cs

(Off-topic, I consider adding a math library to Qowaiv, we might join our efforts)

Corniel avatar Feb 22 '20 10:02 Corniel

Interesting rounding method and also interesting library you have with Qowaiv. What sorts of projects would you use it with?

nathanpjones avatar Feb 24 '20 02:02 nathanpjones

@nathanpjones Projects where you want to apply domain-driven design (to a certain degree). And for me, that is already if you think it has value to decorate a property of a class as Percentage instead of double or decimal, because that is what it is in you use case.

In the case of the rounding, I needed rounding to 10 and 100 for a banking customer, and that was what triggered me to add DecimalRound.

Corniel avatar Feb 27 '20 10:02 Corniel