grain icon indicating copy to clipboard operation
grain copied to clipboard

feat(stdlib): Add `Number.Tan`, `Number.Fact`, `Number.toDegree`, `Number.toRadian`

Open spotandjake opened this issue 1 year ago • 1 comments

Adds Number.tan, Number.fact, Number.toDegree, Number.toRadian this adds the unblocked functions from #1373, along with Number.toDegree and Number.toRadian.

Ref: #1017

spotandjake avatar Oct 04 '22 03:10 spotandjake

I swapped ToDegree and ToRadian I think i had then right second guessed myself and switched them. To convert Factorial to the gamma function we need Math.pow if we want decimal support so i am going to look into that later this week. This stack overflow thread has some good info on the gamma function https://stackoverflow.com/questions/15454183/how-to-make-a-function-that-computes-the-factorial-for-numbers-with-decimals for reference.

spotandjake avatar Oct 14 '22 22:10 spotandjake

I have added a few more functions that are needed for calulating the gamma function i have not finished the gamma function but would like feedback if possible on Number.pow as it is a rather large function, I am going to continue working on the gamma function and factorial though.

spotandjake avatar Oct 24 '22 02:10 spotandjake

Factrorial And Gamma Have Now Been Implemented Correctly so this pr should be all good to go.

spotandjake avatar Oct 24 '22 03:10 spotandjake

This PR title is too long. Can you turn this into 1 separate semantic commit for each feature and then change the title to something like feat(stdlib): Add additional functions and constants to Number module?

phated avatar Oct 24 '22 22:10 phated

Each addition has been made into its own commit now

spotandjake avatar Oct 24 '22 22:10 spotandjake

This pr has been rebased on main is ready for review.

spotandjake avatar Nov 08 '22 03:11 spotandjake