Cleanup lmms_math.h (#7382)

* simplified fraction and absfraction functions

* removed unused fastSqrt() and fastPow()  
functions

* unused absMin() and absMax()

* move roundAt to math header

* Code review from saker

Co-authored-by: saker <sakertooth@gmail.com>

* use std::trunc()

* fixup after fixing merge conflicts

* remove unused fastFma and fastFmal functions.

* remove lmms_basics include, not needed

* use signedPowf from lmms_math in NES

* removed fastRand function, unused

* remove unused sinc function

* cleanup signedPowf

* code review

* further simplify random number math

* removed static from lmms_math file

---------

Co-authored-by: saker <sakertooth@gmail.com>
This commit is contained in:
Rossmaxx
2024-08-28 12:48:56 +05:30
committed by GitHub
parent ff8c47062f
commit a992019626
9 changed files with 75 additions and 233 deletions

View File

@@ -350,18 +350,6 @@ float AutomatableModel::inverseScaledValue( float value ) const
//! @todo: this should be moved into a maths header
template<class T>
void roundAt( T& value, const T& where, const T& step_size )
{
if (std::abs(value - where) < F_EPSILON * std::abs(step_size))
{
value = where;
}
}
template<class T>
void AutomatableModel::roundAt( T& value, const T& where ) const