about summary refs log tree commit diff
path: root/src/complex/carg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/complex/carg.c')
-rw-r--r--src/complex/carg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/complex/carg.c b/src/complex/carg.c
new file mode 100644
index 00000000..d2d1b462
--- /dev/null
+++ b/src/complex/carg.c
@@ -0,0 +1,6 @@
+#include "libm.h"
+
+double carg(double complex z)
+{
+	return atan2(cimag(z), creal(z));
+}