aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/vasp/source/util.h
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.h
parent0a109da279e9df66fb5ea7d6bdaeffed16592f02 (diff)
"version 0.1.1"
svn path=/trunk/; revision=267
Diffstat (limited to 'externals/grill/vasp/source/util.h')
-rw-r--r--externals/grill/vasp/source/util.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/externals/grill/vasp/source/util.h b/externals/grill/vasp/source/util.h
new file mode 100644
index 00000000..1b41c447
--- /dev/null
+++ b/externals/grill/vasp/source/util.h
@@ -0,0 +1,33 @@
+/*
+
+VASP modular - vector assembling signal processor / objects for Max/MSP and PD
+
+Copyright (c) 2002 Thomas Grill (xovo@gmx.net)
+For information on usage and redistribution, and for a DISCLAIMER OF ALL
+WARRANTIES, see the file, "license.txt," in this distribution.
+
+*/
+
+#ifndef __VASP_UTIL_H
+#define __VASP_UTIL_H
+
+#include "main.h"
+
+#ifndef PI
+#define PI 3.1415926535897932385
+#endif
+
+#define BIG 1.e10
+
+
+R arg(R re,R im);
+inline R arg(const CX &c) { return arg(c.real,c.imag); }
+inline F sqabs(F re,F im) { return re*re+im*im; }
+inline F sqabs(const CX &c) { return sqabs(c.real,c.imag); }
+inline F sgn(F x) { return x < 0.?-1.F:1.F; }
+inline V swap(F &a,F &b) { F c = a; a = b; b = c; }
+
+inline I min(I a,I b) { return a < b?a:b; }
+inline I max(I a,I b) { return a > b?a:b; }
+
+#endif