GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-1d42e580e2
trnm.c
Go to the documentation of this file.
1 /* trnm.c CCMATH mathematics library source code.
2  *
3  * Copyright (C) 2000 Daniel A. Atkinson All rights reserved.
4  * This code may be redistributed under the terms of the GNU library
5  * public license (LGPL). ( See the lgpl.license file for details.)
6  * ------------------------------------------------------------------------
7  */
8 void trnm(double *a, int n)
9 {
10  double s, *p, *q;
11 
12  int i, j, e;
13 
14  for (i = 0, e = n - 1; i < n - 1; ++i, --e, a += n + 1) {
15  for (p = a + 1, q = a + n, j = 0; j < e; ++j) {
16  s = *p;
17  *p++ = *q;
18  *q = s;
19  q += n;
20  }
21  }
22 }
void trnm(double *a, int n)
Definition: trnm.c:8