-
-
Notifications
You must be signed in to change notification settings - Fork 949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(number): move methods to new module #1122
Conversation
Currently, I have removed all functions that were moved to the number module. I guess that wasn't the best move from me since we should deprecate them in v8 and remove them in v9. Correct? |
ad4888f
to
a86ee59
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## next #1122 +/- ##
========================================
Coverage 99.63% 99.64%
========================================
Files 2220 2221 +1
Lines 238957 239065 +108
Branches 1035 1045 +10
========================================
+ Hits 238095 238209 +114
+ Misses 841 835 -6
Partials 21 21
|
Suggestion from a discord user:
|
bb10dc1
to
8ae5528
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BLOCKED: we cannot name the module Number
as this is the JavaScript global Number constructor and we would run into the same issues as with _Date
module (were we actually also want to find a better name for, like e.g. DateModule
or Temporal
)
If we name it NumberModule
please first merge #932
160f690
to
f28b146
Compare
Math: Range: The issue here is probably with number.int 1.9 × 2.5 = 4.75 So instead of adding one we might want to add a very small number and then round up. |
We might want to be more strict in number.int anyway and ceil min and floor max before checking and using it. Because then we would pass 5 to mersenne, but since it is exclusive we will only get 4 as max returned value => 4 / 2.5 = 1.6. |
Also since that math confuses even our own developers how about having both options? |
Due to the confusion with the log10 stuff, @ST-DDT and I decided for now to revert the parameter precision change from this PR. |
This move all number generators into their own (number) module.
Idea for this is from #805.