diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2009-04-01 21:13:09 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2009-04-01 21:13:09 +0000 |
commit | 0ed7a8b68dd73e2b0473b8127aeca99f3bac9061 (patch) | |
tree | 5c67818b38a5cc2f9caa5ca7f8640ca356adf02b /externals/grill/vasp/source/util.h | |
parent | bb4c7f6a245394d09dac9adfb2efb093d3d98452 (diff) |
cleaned up grill externals - replaced with svn:externals to svn.grrrr.org/ext/trunk/
svn path=/trunk/; revision=10951
Diffstat (limited to 'externals/grill/vasp/source/util.h')
-rw-r--r-- | externals/grill/vasp/source/util.h | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/externals/grill/vasp/source/util.h b/externals/grill/vasp/source/util.h deleted file mode 100644 index 7f7cd080..00000000 --- a/externals/grill/vasp/source/util.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - -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 - -#ifdef min -#undef min -#endif - -#ifdef max -#undef max -#endif - -template<class T> -inline V swap(T &a,T &b) { T c = a; a = b; b = c; } - -template<class T> -inline T min(T a,T b) { return a < b?a:b; } - -template<class T> -inline T max(T a,T b) { return a > b?a:b; } - - -template<class T> -T arg(T re,T im) -{ - if(re) - return (T)(fmod(atan(im/re)+(re < 0?2*PI:PI),2*PI)-PI); - else - if(im || re) return (T)(im > 0?PI/2:-PI/2); - else return 0; -} - -template<class T> -inline T sgn(T x) { return (T)(x?(x < 0?-1:1):0); } - -template<class T> -inline T sqabs(T re,T im) { return re*re+im*im; } - - - -#endif |