mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-09-23 22:44:44 -04:00
Expose weight() of FixedErrorFilter.
This commit is contained in:
parent
474eaa8541
commit
68250b4d30
1 changed files with 7 additions and 3 deletions
|
@ -91,18 +91,22 @@ class FixedErrorFilter {
|
|||
public:
|
||||
FixedErrorFilter(
|
||||
const float weight = (1.0f / 16.0f)
|
||||
) : weight { weight }
|
||||
) : weight_ { weight }
|
||||
{
|
||||
}
|
||||
|
||||
float operator()(
|
||||
const float lateness
|
||||
) const {
|
||||
return (lateness < 0.0f) ? weight : -weight;
|
||||
return (lateness < 0.0f) ? weight() : -weight();
|
||||
}
|
||||
|
||||
float weight() const {
|
||||
return weight_;
|
||||
}
|
||||
|
||||
private:
|
||||
const float weight;
|
||||
const float weight_;
|
||||
};
|
||||
|
||||
template<typename ErrorFilter>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue