We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the issue is at line 224 of scripts/audioProcessor.mjs
scripts/audioProcessor.mjs
params.push('int', 'window'); values.push(Math.floor, globalThis);
when a function is called int it usually means the function truncates the value passed, here it's actually flooring the value
int
the difference between flooring and truncating is that flooring will round towards -infinity, while truncating will round towards 0
for example, -2.4 will be floored to -3, but it will be truncated to -2
-2.4
-3
-2
you can change the int to be an alias to Math.trunc to fix this
Math.trunc
The text was updated successfully, but these errors were encountered:
Replacing floor with int was originally taken from the Greggman player: https://github.com/greggman/html5bytebeat/blob/master/src/ByteBeatCompiler.js#L339 I can fix it, but I'll have to look through all the library, I once replaced floor with int everywhere in the minimized and formatted versions.
floor
Sorry, something went wrong.
No branches or pull requests
the issue is at line 224 of
scripts/audioProcessor.mjs
when a function is called
int
it usually means the function truncates the value passed, here it's actually flooring the valuethe difference between flooring and truncating is that flooring will round towards -infinity, while truncating will round towards 0
for example,
-2.4
will be floored to-3
, but it will be truncated to-2
you can change the
int
to be an alias toMath.trunc
to fix thisThe text was updated successfully, but these errors were encountered: