Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

util_math.h File Reference

math related util functions More...

Go to the source code of this file.

Functions

double calc_percent (double amt, double total)


Detailed Description

math related util functions

Author:
Chris Green <cmg@sourcefire.com>
Date:
Fri Jun 27 10:12:57 2003
Place simple math functions that are useful all over the place here.

Definition in file util_math.h.


Function Documentation

double calc_percent double  amt,
double  total
 

Calculate the percentage of something.

If the total is <= 0, we return 0.

Parameters:
amt amount to that you have
total amount there is
Returns:
a/b * 100

Definition at line 24 of file util_math.c.

Referenced by DisplayFlowConfig(), flowcache_stats(), FlowPSOutputConfig(), scoreboard_stats(), server_stats(), and ut_stats().


Generated on Sun May 14 14:51:27 2006 by  doxygen 1.4.2