diff options
| author | 1995-10-18 08:37:01 +0000 | |
|---|---|---|
| committer | 1995-10-18 08:37:01 +0000 | |
| commit | df930be708d50e9715f173caa26ffe1b7599b157 (patch) | |
| tree | aa317e49e28cb999c9cf3db7f00c20903fe6010a /lib/libm/src/w_cabs.c | |
| download | wireguard-openbsd-df930be708d50e9715f173caa26ffe1b7599b157.tar.xz wireguard-openbsd-df930be708d50e9715f173caa26ffe1b7599b157.zip | |
initial import of NetBSD tree
Diffstat (limited to 'lib/libm/src/w_cabs.c')
| -rw-r--r-- | lib/libm/src/w_cabs.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/libm/src/w_cabs.c b/lib/libm/src/w_cabs.c new file mode 100644 index 00000000000..f55a2dde8e0 --- /dev/null +++ b/lib/libm/src/w_cabs.c @@ -0,0 +1,20 @@ +/* + * cabs() wrapper for hypot(). + * + * Written by J.T. Conklin, <jtc@wimsey.com> + * Placed into the Public Domain, 1994. + */ + +#include <math.h> + +struct complex { + double x; + double y; +}; + +double +cabs(z) + struct complex z; +{ + return hypot(z.x, z.y); +} |
