razorpay / go-financial

A go port of numpy-financial functions and more.
MIT License
310 stars 22 forks source link

Pv and Npv functions along with respective tests #8

Closed thsubaku9 closed 3 years ago

thsubaku9 commented 3 years ago

This PR is regarding the addition of Pv and Npv functions. Test cases regarding the same have been added.

Npv takes the second parameter as an array of float as opposed to using variadic functions. This was done as testing variadic functions is cumbersome at present ( javascript handles this using the spread syntax so any array can be unpacked and passed accordingly).

Kindly review my code for improvements.

gyanesh-m commented 3 years ago

Hi @thsubaku9, Thanks for your contribution! The examples are missing. Please add those in Readme and example_reducing_utils_test.go .

thsubaku9 commented 3 years ago

Sorry for the delay. I believe things should be in order now

thsubaku9 commented 3 years ago

Sorry about that (οΌ›δΈ€_δΈ€)

thsubaku9 commented 3 years ago

Alright, I think that is it?

gyanesh-m commented 3 years ago

Thanks for your contribution @thsubaku9 !πŸŽ‰
I really appreciate it πŸ™‚

thsubaku9 commented 3 years ago

Thank you for your time and patience πŸ™‚