source: trunk/MagicSoft/slalib/dmxv.c@ 10058

Last change on this file since 10058 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 891 bytes
Line 
1#include "slalib.h"
2#include "slamac.h"
3void slaDmxv ( double dm[3][3], double va[3], double vb[3] )
4/*
5** - - - - - - - -
6** s l a D m x v
7** - - - - - - - -
8**
9** Performs the 3-d forward unitary transformation:
10** vector vb = matrix dm * vector va
11**
12** (double precision)
13**
14** Given:
15** dm double[3][3] matrix
16** va double[3] vector
17**
18** Returned:
19** vb double[3] result vector
20**
21** Note: va and vb may be the same array.
22**
23** Last revision: 6 November 1999
24**
25** Copyright P.T.Wallace. All rights reserved.
26*/
27{
28 int i, j;
29 double w, vw[3];
30
31/* Matrix dm * vector va -> vector vw */
32 for ( j = 0; j < 3; j++ ) {
33 w = 0.0;
34 for ( i = 0; i < 3; i++ ) {
35 w += dm[j][i] * va[i];
36 }
37 vw[j] = w;
38 }
39
40/* Vector vw -> vector vb */
41 for ( j = 0; j < 3; j++ ) {
42 vb[j] = vw[j];
43 }
44}
Note: See TracBrowser for help on using the repository browser.