aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/vasp/source/util.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2002-12-02 19:21:08 +0000
committerThomas Grill <xovo@users.sourceforge.net>2002-12-02 19:21:08 +0000
commit9815096db22c73cacdbb65512d1b61d633db7fa8 (patch)
tree4a6582ead85b8efd031f68e717fbc8a5b3a3df3f /externals/grill/vasp/source/util.cpp
parent0a109da279e9df66fb5ea7d6bdaeffed16592f02 (diff)
"version 0.1.1"
svn path=/trunk/; revision=267
Diffstat (limited to 'externals/grill/vasp/source/util.cpp')
-rw-r--r--externals/grill/vasp/source/util.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/externals/grill/vasp/source/util.cpp b/externals/grill/vasp/source/util.cpp
new file mode 100644
index 00000000..c487e3d1
--- /dev/null
+++ b/externals/grill/vasp/source/util.cpp
@@ -0,0 +1,12 @@
+#include "util.h"
+#include <math.h>
+
+R arg(R re,R im)
+{
+ if(re)
+ return fmod(atan(im/re)+(re < 0?2*PI:PI),2*PI)-PI;
+ else
+ if(im || re) return im > 0?PI/2:-PI/2;
+ else return 0;
+}
+