From 0ed7a8b68dd73e2b0473b8127aeca99f3bac9061 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Wed, 1 Apr 2009 21:13:09 +0000 Subject: cleaned up grill externals - replaced with svn:externals to svn.grrrr.org/ext/trunk/ svn path=/trunk/; revision=10951 --- externals/grill/vasp/source/util.h | 58 -------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 externals/grill/vasp/source/util.h (limited to 'externals/grill/vasp/source/util.h') 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 -inline V swap(T &a,T &b) { T c = a; a = b; b = c; } - -template -inline T min(T a,T b) { return a < b?a:b; } - -template -inline T max(T a,T b) { return a > b?a:b; } - - -template -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 -inline T sgn(T x) { return (T)(x?(x < 0?-1:1):0); } - -template -inline T sqabs(T re,T im) { return re*re+im*im; } - - - -#endif -- cgit v1.2.1