Skip to content
New issue

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

float mul(vec3, vec3) #7

Open
GregorGullwi opened this issue Feb 1, 2012 · 0 comments
Open

float mul(vec3, vec3) #7

GregorGullwi opened this issue Feb 1, 2012 · 0 comments

Comments

@GregorGullwi
Copy link

The library converts all mul() calls to regular multiplication operations, but there's a special case that doesn't work and that's when it's assigned to a scalar and not a vector.

The example I have is:
float3 aVector = float3(1, 2, 3);
float a = mul(aVector, aVector);

it currently converts to:
float a = ( aVector * aVector );

which doesn't compile... it should be a dot product instead:
float a = dot(aVector, aVector);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant