cmattr.c 532 B

12345678910111213141516171819
  1. /* cmattr.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. #include "ccmath.h"
  9. void cmattr(Cpx * a, Cpx * b, int m, int n)
  10. {
  11. Cpx *p;
  12. int i, j;
  13. for (i = 0; i < n; ++i, ++b)
  14. for (j = 0, p = b; j < m; ++j, p += n)
  15. *a++ = *p;
  16. }