-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Use C++20 std::numbers, std::lerp() #7696
Conversation
Also replace the only use of lmms::numbers::inv_e with a local constexpr instead
They were only used in one or two places each
This is probably not needed for some of these files. I'll remove those later
Rest in peace lmms::numbers::tau, my beloved
A lot of the remaining constants in lmms_constants.h are specific to SaProcessor. If they are only used there, shouldn't they be in SaProcessor.h?
Almost all the remaining constants in Besides moving Edit: |
- And also move F_EPSILON into lmms_math.h - And also add an overload for fast_rand() to specify a higher and lower bound - And a bunch of other nonsense
As well as time travel to undo several foolish decisions and squash tiny commits together
a254925
to
d7a735b
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.
Looks pretty good. I just have a few suggestions
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
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.
I think this is just about ready to merge
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
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.
LGTM. I'll merge tomorrow if there are no objections
Thanks again! |
In #7558, I added
lmms::numbers
; in this PR, I destroy it.<concepts>
such asfloating_point
rather thantypename
for templateslmms::numbers
that are also defined instd::numbers
with thestd::numbers
versionlmms::numbers::tau
with2 * std::numbers::pi
? (I love τ dearly, but @messmerd has a point)lerp()
fromlmms_math.h
andlinearInterpolate()
frominterpolation.h
withstd::lerp()
(this should have happened in Update math functions to C++ standard library #7685 but I didn't realizestd::lerp()
existed)