diff --git a/miscmaths.cc b/miscmaths.cc index 33a37cff69100d6ba60e1db5ebe4ad26f8e6ba09..8022a23cad85d1274fc875f10a409d3866fda02b 100644 --- a/miscmaths.cc +++ b/miscmaths.cc @@ -446,25 +446,6 @@ namespace MISCMATHS { return a*a + b*b + c*c; } - int Identity(Matrix& m) - { - Tracer tr("Identity"); - m=0.0; - for (int j=1; j<=m.Nrows(); j++) - m(j,j)=1.0; - return 0; - } - - ReturnMatrix Identity(int num) - { - Tracer tr("Identity"); - Matrix eye(num,num); - Identity(eye); - eye.Release(); - return eye; - } - - int diag(Matrix& m, const float diagvals[]) { Tracer tr("diag"); @@ -954,8 +935,6 @@ namespace MISCMATHS { Matrix rotmat(3,3); rotmat = aff3 * scales.i() * (skew.SubMatrix(1,3,1,3)).i(); ColumnVector transl(3); - //transl = affmat.SubMatrix(1,3,4,4); - //transl = transl - (Identity(3) - rotmat)*centre; transl = affmat.SubMatrix(1,3,1,3)*centre + affmat.SubMatrix(1,3,4,4) - centre; for (int i=1; i<=3; i++) { params(i+3) = transl(i); } diff --git a/miscmaths.h b/miscmaths.h index d8a88a266f3c3571e48baa5b9bcfb104fac34880..6becb3c78a974df0deb11fa71e262cd4643c5211 100644 --- a/miscmaths.h +++ b/miscmaths.h @@ -121,7 +121,6 @@ namespace MISCMATHS { float norm2sq(float a, float b, float c); int Identity(Matrix& m); - ReturnMatrix Identity(int num); ColumnVector seq(const int num); int diag(Matrix& m, const float diagvals[]);