-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Operator overloads for Graphene #1604
base: main
Are you sure you want to change the base?
Conversation
That's just |
Sure that works, but it can lose accuracy because of the limited precision of floating-point numbers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me in general. @bilelmoussaoui ?
Indeed. Maybe better to keep that explicit then that there's no direct division and leave the choice to the caller |
The clippy warnings need some fixing |
Do I just explicitly specify the method names (i.e. |
I think that would make it most clear |
Currently includes:
Semantics follow GLSL:
vector * vector
is component-wise multiplication,scalar * vector
is scaling.Only thing I haven't implemented is dividing a vector by a scalar, since Graphene for whatever reason doesn't have that as a function.