30 #ifndef MCL_3DL_FILTER_H 31 #define MCL_3DL_FILTER_H 55 Filter(
const enum type_t type,
const float tc,
const float out0,
const bool angle =
false)
67 x_ = (1 - k_[2]) * out0 / k_[3];
73 k_[0] = 2 * time_const_ * (-k_[1] + 1.0);
74 x_ = (1 - k_[2]) * out0 / k_[3];
79 void set(
const float& out0)
81 x_ = (1 - k_[2]) * out0 / k_[3];
84 float in(
const float& i)
87 assert(std::isfinite(in));
91 in = out_ + remainder(in - out_, M_PI * 2.0);
93 x_ = k_[0] * in + k_[1] *
x_;
94 out_ = k_[2] * in + k_[3] *
x_;
96 assert(std::isfinite(out_));
106 #endif // MCL_3DL_FILTER_H
TFSIMD_FORCE_INLINE tfScalar angle(const Quaternion &q1, const Quaternion &q2)
Filter(const enum type_t type, const float tc, const float out0, const bool angle=false)