Bitwise "^ operator" in BiquadFilter?
There are two instance of the "^ operator" in the recalculateCoefficients() function. I think they are being used on floating point values. It's more common to use bitwise operations on Integers. Maybe the "^" were meant to be "Math.pow" instead?
i am sure that this is the XOR operator, for an operator that is like Math.pow, there is **. Example: 3 ** 2 === 9
@Taureon it is indeed the bitwas XOR operator in JavaScript, but that's what the bug report seems to be about.
Most comments in that code use ^ as the exponent operator (it's a relatively common notation, since ^ as used as the power/exponent operator in some programming languages, and in LaTeX, for example). It's likely that this code was written with the intention to use power/exponent where ^ is used.
In those lines of code, A^2 should probably be replaced with A*A:
case DSP.LOW_SHELF: // H(s) = A * (s^2 + (sqrt(A)/Q)*s + A)/(A*s^2 + (sqrt(A)/Q)*s + 1)
coeff = sinw0 * Math.sqrt( (A^2 + 1)*(1/this.S - 1) + 2*A );
// ...
case DSP.HIGH_SHELF: // H(s) = A * (A*s^2 + (sqrt(A)/Q)*s + 1)/(s^2 + (sqrt(A)/Q)*s + A)
coeff = sinw0 * Math.sqrt( (A^2 + 1)*(1/this.S - 1) + 2*A );