Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4973 | right-hear | 1 | /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ |
2 | /* |
||
3 | * cabs() wrapper for hypot(). |
||
4 | * |
||
5 | * Written by J.T. Conklin, |
||
6 | * Placed into the Public Domain, 1994. |
||
7 | */ |
||
8 | |||
9 | #include |
||
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 | } |