Open simonbaird opened 8 years ago
Do you think it belongs here?
Possible usage:
>> require 'bigdecimal/math/tau' >> BigMath.TAU(42).to_s => "0.62831853071795864769252867665590057683943387987502116419498752479875898091728E1"
Code is something like this:
require 'bigdecimal/math' def BigMath.TAU(prec) PI(prec) * BigDecimal('2') end
I could make a pull request if you think it's worthwhile.
Is there an equivalent BigMath::PI?
BigMath::PI
Ah, I see there is. Yeah, let's add it :]
How's that look?
Went for module_function so it's more similar to the PI definition.
Do you think it belongs here?
Possible usage:
Code is something like this:
I could make a pull request if you think it's worthwhile.