We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
normalize*
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
Hey folks,
I was looking through the normalize2, normalize3, and normalize4 functions and noticed this pattern:
normalize2
normalize3
normalize4
return v * splat(F32x4, 1.0) / sqrt(dotX(v, v));
Out of curiosity, I tried removing the splat(F32x4, 1.0) since multiplying by 1 shouldn’t change the result, and everything still passes:
splat(F32x4, 1.0)
return v / sqrt(dotX(v, v));
Is there a reason for explicitly multiplying by splat(1.0)? am I missing something?
splat(1.0)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey folks,
I was looking through the
normalize2
,normalize3
, andnormalize4
functions and noticed this pattern:Out of curiosity, I tried removing the
splat(F32x4, 1.0)
since multiplying by 1 shouldn’t change the result, and everything still passes:Is there a reason for explicitly multiplying by
splat(1.0)
? am I missing something?The text was updated successfully, but these errors were encountered: