SAnsell / CombLayer

MCNP(X) project builder using C++
GNU General Public License v3.0
14 stars 13 forks source link

Bug fix in Vec3D #40

Closed SAnsell closed 8 years ago

SAnsell commented 8 years ago

Sorry but I had to fix a bug in Vec3D and that meant a small change in MatrixBase.h. That will involve a complete rebuild as I think MatrixBase.h is in almost every .cxx file.

Hopefully, you were not affected by the bug - - it is only occurs if you try to set a Vec3D from a 3x1 or 1x3 matrix but actually the matrix is not 3x1 / 1x3. Then you get undefined behaviour if the matrix is smaller than that. Now you don't, if the matrix is smaller than 1x3 then you get 0 as the coefficients and if it is bigger then you just truncate.