00001 /* Multiply a symmetric 2-d matrix by a vector. */ 00002 00003 inline void mdcTwoVec(const double matrix[3], const double invect[2], 00004 double outvect[2]) { 00005 00006 double buffvec[2]; /* Buffer the output in case outvect = invect. */ 00007 00008 /************************************************************************/ 00009 00010 buffvec[0] = matrix[0] * invect[0] + matrix[1] * invect[1]; 00011 buffvec[1] = matrix[1] * invect[0] + matrix[2] * invect[1]; 00012 00013 outvect[0] = buffvec[0]; 00014 outvect[1] = buffvec[1]; 00015 00016 return; 00017 }