[PD-cvs] pd/src builtins.c, 1.1.2.26, 1.1.2.27 builtins_dsp.c, 1.1.2.20, 1.1.2.21 desire.c, 1.1.2.217.2.145, 1.1.2.217.2.146 desire.h, 1.1.2.49.2.28, 1.1.2.49.2.29

Mathieu Bouchard matju at users.sourceforge.net
Mon Jul 9 21:56:35 CEST 2007


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27501

Modified Files:
      Tag: desiredata
	builtins.c builtins_dsp.c desire.c desire.h 
Log Message:
common templates min,max,clip go in desire.h


Index: builtins.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/builtins.c,v
retrieving revision 1.1.2.26
retrieving revision 1.1.2.27
diff -C2 -d -r1.1.2.26 -r1.1.2.27
*** builtins.c	9 Jul 2007 17:57:55 -0000	1.1.2.26
--- builtins.c	9 Jul 2007 19:56:28 -0000	1.1.2.27
***************
*** 63,68 ****
  #undef min
  #undef max
- template <class T> T min(T a, T b) {return a<b?a:b;}
- template <class T> T max(T a, T b) {return a>b?a:b;}
  
  float mtof(float f) {return f>-1500 ? 8.17579891564 * exp(.0577622650 * min(f,1499.f)) : 0;}
--- 63,66 ----

Index: builtins_dsp.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/builtins_dsp.c,v
retrieving revision 1.1.2.20
retrieving revision 1.1.2.21
diff -C2 -d -r1.1.2.20 -r1.1.2.21
*** builtins_dsp.c	28 Jun 2007 16:36:29 -0000	1.1.2.20
--- builtins_dsp.c	9 Jul 2007 19:56:29 -0000	1.1.2.21
***************
*** 44,50 ****
  #undef min
  #undef max
- template <class T> T min(T a, T b) {return a<b?a:b;}
- template <class T> T max(T a, T b) {return a>b?a:b;}
- template <class T> T clip(T a, T b, T c) {return min(max(a,b),b);}
  
  /* ----------------------------- plus ----------------------------- */
--- 44,47 ----

Index: desire.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.h,v
retrieving revision 1.1.2.49.2.28
retrieving revision 1.1.2.49.2.29
diff -C2 -d -r1.1.2.49.2.28 -r1.1.2.49.2.29
*** desire.h	9 Jul 2007 19:50:19 -0000	1.1.2.49.2.28
--- desire.h	9 Jul 2007 19:56:32 -0000	1.1.2.49.2.29
***************
*** 327,330 ****
--- 327,331 ----
  template <class T> static T min(T a, T b) {return a<b?a:b;}
  template <class T> static T max(T a, T b) {return a>b?a:b;}
+ template <class T> T clip(T a, T b, T c) {return min(max(a,b),b);}
  #endif
  #endif /* __DESIRE_H */

Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.217.2.145
retrieving revision 1.1.2.217.2.146
diff -C2 -d -r1.1.2.217.2.145 -r1.1.2.217.2.146
*** desire.c	9 Jul 2007 17:57:55 -0000	1.1.2.217.2.145
--- desire.c	9 Jul 2007 19:56:29 -0000	1.1.2.217.2.146
***************
*** 75,80 ****
  
  #define CLAMP(_var,_min,_max) do { if (_var<_min) _var=_min; else if (_var>_max) _var=_max; } while(0)
- template <class T> T min(T a, T b) {return a<b?a:b;}
- template <class T> T max(T a, T b) {return a>b?a:b;}
  #define IS_A_FLOAT(atom,index)   ((atom+index)->a_type == A_FLOAT)
  #define IS_A_SYMBOL(atom,index)  ((atom+index)->a_type == A_SYMBOL)
--- 75,78 ----





More information about the Pd-cvs mailing list