4 ms·
First of all that only works with vectors, but I want operator overloading to also work on things like matrices or custom types (for example quaterions, or a sy
by cyber_kinetist 3y ago
First of all that only works with vectors, but I want operator overloading to also work on things like matrices or custom types (for example quaterions, or a symmat3 struct that represents a symmetric 3x3 matrix using only 6 floats).
Additionally, for efficient math code you often want vector / matrix types in AOSOA fasion: for example Vec3<Float8> to store an AVX lane for each X/Y/Z component. I want vector/matrix operations to work on SIMD lanes, not just for scalar types, and Zig currently can't support math operators on these kinds of types.
- felixgallo 3y agoI have a marvelous proof that you can solve that with comptime but unfortunately the margins of this website are too small to contain it.
- lvass 3y agoDo us a pastebin, please.
- QQ00 3y agoYou can use pastebin, or even better, use github gist.
- another2another 3y agoI think you have briefly deluded yourself with an irretrievable idea.