grain
grain copied to clipboard
feat(stdlib): Add `Number.Tan`, `Number.Fact`, `Number.toDegree`, `Number.toRadian`
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
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.
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.
Factrorial And Gamma Have Now Been Implemented Correctly so this pr should be all good to go.
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
?
Each addition has been made into its own commit now
This pr has been rebased on main is ready for review.