Registered Member
|
Hi all,
I am implementing method perpendicular(...) which is supposed to compute a vector orthogonal to this. My code is only meaningful with Vector2 and Vector3. Though I do not manage to implement the behaviors for Vector2 and Vector3 in the same method (in MatrixBase_plugin.h).
When I do this I get YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES so I currently had to implement it in 2 differently named functions (which is dirty). Any idea of what I should do? Thanks, Antoine. |
Moderator
|
You need a "compile-time if" using meta programming, or simply call vec.unitOrthogonal()! If you really want to re-implement it, have a look at its implementation first: https://bitbucket.org/eigen/eigen/src/1 ... hods.h-137
|
Registered Member
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]