| Last change
 on this file since 8673 was             731, checked in by tbretz, 25 years ago | 
        
          | *** empty log message *** | 
        
          | 
              
Property                 svn:executable
 set to                 * | 
        
          | File size:
            1.0 KB | 
      
      
| Line |  | 
|---|
| 1 | #include "slalib.h" | 
|---|
| 2 | #include "slamac.h" | 
|---|
| 3 | void slaImxv ( float rm[3][3], float va[3], float vb[3] ) | 
|---|
| 4 | /* | 
|---|
| 5 | **  - - - - - - - - | 
|---|
| 6 | **   s l a I m x v | 
|---|
| 7 | **  - - - - - - - - | 
|---|
| 8 | ** | 
|---|
| 9 | **  Performs the 3-d backward unitary transformation: | 
|---|
| 10 | ** | 
|---|
| 11 | **     vector vb = (inverse of matrix rm) * vector va | 
|---|
| 12 | ** | 
|---|
| 13 | **  (single precision) | 
|---|
| 14 | ** | 
|---|
| 15 | **  n.b.  The matrix must be unitary, as this routine assumes that | 
|---|
| 16 | **        the inverse and transpose are identical. | 
|---|
| 17 | ** | 
|---|
| 18 | **  Given: | 
|---|
| 19 | **     rm       float[3][3]    matrix | 
|---|
| 20 | **     va       float[3]       vector | 
|---|
| 21 | ** | 
|---|
| 22 | **  Returned: | 
|---|
| 23 | **     vb       float[3]       result vector | 
|---|
| 24 | ** | 
|---|
| 25 | **  The same vector can be specified for both va and vb. | 
|---|
| 26 | ** | 
|---|
| 27 | **  Last revision:   6 November 1999 | 
|---|
| 28 | ** | 
|---|
| 29 | **  Copyright P.T.Wallace.  All rights reserved. | 
|---|
| 30 | */ | 
|---|
| 31 | { | 
|---|
| 32 | int i, j; | 
|---|
| 33 | float w, vw[3]; | 
|---|
| 34 |  | 
|---|
| 35 | /* Inverse of matrix rm * vector va -> vector vw */ | 
|---|
| 36 | for ( j = 0; j < 3; j++ ) { | 
|---|
| 37 | w = 0.0f; | 
|---|
| 38 | for ( i = 0; i < 3; i++ ) { | 
|---|
| 39 | w += rm[i][j] * va[i]; | 
|---|
| 40 | } | 
|---|
| 41 | vw[j] = w; | 
|---|
| 42 | } | 
|---|
| 43 |  | 
|---|
| 44 | /* Vector vw -> vector vb */ | 
|---|
| 45 | for ( j = 0; j < 3; j++ ) { | 
|---|
| 46 | vb[j] = vw[j]; | 
|---|
| 47 | } | 
|---|
| 48 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.