summaryrefslogtreecommitdiffstats
path: root/src/misc/vec/vecFlt.h
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-09-18 13:23:58 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-09-18 13:23:58 -0700
commite0eb270324ab71403ded07e9700152c2755e5095 (patch)
treef89a2a168e6648989e54b025ea08cecf5c6c4efd /src/misc/vec/vecFlt.h
parent508b6f1b1356f87340d7e722c288b9ddccdd542e (diff)
downloadabc-e0eb270324ab71403ded07e9700152c2755e5095.tar.gz
abc-e0eb270324ab71403ded07e9700152c2755e5095.tar.bz2
abc-e0eb270324ab71403ded07e9700152c2755e5095.zip
Changes to command 'upsize'.
Diffstat (limited to 'src/misc/vec/vecFlt.h')
-rw-r--r--src/misc/vec/vecFlt.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/misc/vec/vecFlt.h b/src/misc/vec/vecFlt.h
index 873139f7..6b4b8f9b 100644
--- a/src/misc/vec/vecFlt.h
+++ b/src/misc/vec/vecFlt.h
@@ -619,6 +619,42 @@ static inline int Vec_FltRemove( Vec_Flt_t * p, float Entry )
/**Function*************************************************************
+ Synopsis [Find entry.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+static inline float Vec_FltFindMax( Vec_Flt_t * p )
+{
+ int i;
+ float Best;
+ if ( p->nSize == 0 )
+ return 0;
+ Best = p->pArray[0];
+ for ( i = 1; i < p->nSize; i++ )
+ if ( Best < p->pArray[i] )
+ Best = p->pArray[i];
+ return Best;
+}
+static inline float Vec_FltFindMin( Vec_Flt_t * p )
+{
+ int i;
+ float Best;
+ if ( p->nSize == 0 )
+ return 0;
+ Best = p->pArray[0];
+ for ( i = 1; i < p->nSize; i++ )
+ if ( Best > p->pArray[i] )
+ Best = p->pArray[i];
+ return Best;
+}
+
+/**Function*************************************************************
+
Synopsis [Comparison procedure for two floats.]
Description []