mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-20 18:27:39 +00:00
Expose weight() of FixedErrorFilter.
This commit is contained in:
@@ -91,18 +91,22 @@ class FixedErrorFilter {
|
|||||||
public:
|
public:
|
||||||
FixedErrorFilter(
|
FixedErrorFilter(
|
||||||
const float weight = (1.0f / 16.0f)
|
const float weight = (1.0f / 16.0f)
|
||||||
) : weight { weight }
|
) : weight_ { weight }
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
float operator()(
|
float operator()(
|
||||||
const float lateness
|
const float lateness
|
||||||
) const {
|
) const {
|
||||||
return (lateness < 0.0f) ? weight : -weight;
|
return (lateness < 0.0f) ? weight() : -weight();
|
||||||
|
}
|
||||||
|
|
||||||
|
float weight() const {
|
||||||
|
return weight_;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const float weight;
|
const float weight_;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename ErrorFilter>
|
template<typename ErrorFilter>
|
||||||
|
Reference in New Issue
Block a user