#ifndef __NRVECT_H__ #define __NRVECT_H__ #ifdef __cplusplus extern "C" { #endif typedef double * NRVectP ; typedef double ** NRMatrix33P ; /* U = ai + bj + ck V = Ai + Bj + Ck U x V = (bC - cB) i + (cA - aC) j + (aB - bA) k */ /* Fortran convention for array indicies. WRITE(6,'(/A,3(/3F12.6))') & ' Rotation matrix =',((ROT(I,J),J=1,3),I=1,3) ROT(row,col) so for all nr routines I will use ROT[row][col] */ /* In fortran matrices are stored so that the first index is fast moving: A(1,1) A(2,1) A(3,1) A(1,2) A(2,2) A(3,2) A(1,3) A(2,3) A(3,3) This is opposite the order in C: A[1][1] A[1][2] A[1][3] A[2][1] A[2][2] A[2][3] A[3][1] A[3][2] A[3][3] */ #ifdef __cplusplus } #endif #endif /* !__NRVECT_H__ */