Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
  2. /*
  3.  * cabs() wrapper for hypot().
  4.  *
  5.  * Written by J.T. Conklin, <jtc@wimsey.com>
  6.  * Placed into the Public Domain, 1994.
  7.  */
  8.  
  9. #include <math.h>
  10.  
  11. struct complex {
  12.         double x;
  13.         double y;
  14. };
  15.  
  16. double
  17. cabs(z)
  18.         struct complex z;
  19. {
  20.         return hypot(z.x, z.y);
  21. }
  22.