Skip to content
Snippets Groups Projects
Commit 7b01a780 authored by Angel Santamaria-Navarro's avatar Angel Santamaria-Navarro
Browse files

Fix odd bug about rotations...

Bug was: in Eigen matrix functions, passing a matrix expression by reference means
that each time the reference is needed the expression was reevaluated.
This produced that when calling a function
  e.g. f( Matrix::Random() ),
the parameter passed is an expression and not a matrix. Therefore, each
time the matrix is used in f(), a new Random was created.

Solution: use the .eval() method to evaluate the expression:
as in
  e.g. f( Matrix::Random().eval() )
parent c80b39c1
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment