Skip to content
Snippets Groups Projects
Commit 783930dd authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent 9a120d45
No related branches found
No related tags found
No related merge requests found
// $Id: NumericEmbedded.cpp,v 1.1 2008-01-22 16:47:10 geuzaine Exp $
// $Id: NumericEmbedded.cpp,v 1.2 2008-01-22 19:41:01 geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
......@@ -198,10 +198,10 @@ double inv2x2(double mat[2][2], double inv[2][2])
const double det = det2x2(mat);
if(det){
double ud = 1. / det;
inv[0][0] = ( mat[1][1] ) * ud ;
inv[1][0] = -( mat[1][0] ) * ud ;
inv[0][1] = -( mat[0][1] ) * ud ;
inv[1][1] = ( mat[0][0] ) * ud ;
inv[0][0] = mat[1][1] * ud;
inv[1][0] = -mat[1][0] * ud;
inv[0][1] = -mat[0][1] * ud;
inv[1][1] = mat[0][0] * ud;
}
else{
Msg(GERROR, "Singular matrix");
......@@ -286,7 +286,7 @@ double triangle_area(double p0[3], double p1[3], double p2[3])
b[2] = p0[2] - p1[2];
prodve(a, b, c);
return (0.5 * sqrt(c[0] * c[0] + c[1] * c[1] + c[2] * c[2]));
return 0.5 * sqrt(c[0] * c[0] + c[1] * c[1] + c[2] * c[2]);
}
char float2char(float f)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment