4 ms·
> There would still have to be different hardcoded signatures and implementations for cross-product, transformations and "angleTo"-type methods You are right,
by onedognight 14y ago
> There would still have to be different hardcoded signatures and implementations for cross-product, transformations and "angleTo"-type methods
You are right, those are great test cases for Rust.
The cross-product takes n-1 n-vectors are returns an n-vector (orthogonal to the n-1 inputs). The transformations are easy to generalize as affine or homogeneous transformations.
A nice features of Rust is that it has macros, so once it has dependent types creating these function with different signatures should be straight forward!
I'd hope that like C++, you would be able to add in any extra functions you'd need for specific dimensions.