There should be an orthogonal() method in MatrixBase that returns a vector orthogonal to *this and with the same length as *this. I.e. (-y, x) for 2d, and unitOrthogonal() could be defined as unitOrthogonal() = orthogonal().normalized()
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/376.