Skip to content
This repository has been archived by the owner on May 9, 2018. It is now read-only.

Fix typechecking on matrix-vector multiplications #50

Open
davepagurek opened this issue Nov 13, 2017 · 4 comments
Open

Fix typechecking on matrix-vector multiplications #50

davepagurek opened this issue Nov 13, 2017 · 4 comments

Comments

@davepagurek
Copy link
Member

These should be allowed

@pbardea
Copy link
Member

pbardea commented Nov 13, 2017

Do we also want to allow vector + matrix addition/subtraction/division?

I think they all will make sense but my lin-alg is a bit rusty.

@pbardea pbardea self-assigned this Nov 13, 2017
@davepagurek
Copy link
Member Author

For addition and subtraction, it's elementwise, so it has to be the same size. For multiplication, the width of the left hand side must equal the height of the right hand side.

@pbardea
Copy link
Member

pbardea commented Nov 13, 2017

For now, probably makes sense to just trust the user. When we want to add this type of type-checking, we'll add it in w/ the rest of the type checking which will be done as a walk through the AST after it's been constructed.

@davepagurek
Copy link
Member Author

https://en.wikibooks.org/wiki/GLSL_Programming/Vector_and_Matrix_Operations#Operators for reference on what's defined and what the result is

@pbardea pbardea removed their assignment Oct 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants