⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 util_math.c

📁 Linux snort-2.4.4源代码
💻 C
字号:
/** * @file   util_math.c * @author Chris Green <cmg@sourcefire.com> * @date   Fri Jun 27 10:12:57 2003 *  * @brief  math related util functions *  * Place simple math functions that are useful all over the place * here. */#include "util_math.h"/**  * Calculate the percentage of something. * * If the total is <= 0, we return 0. *  * @param amt amount to that you have * @param total amount there is *  * @return a/b * 100 */double calc_percent(double amt, double total){    if(total <= 0.0)        return 0.0;            return (amt/total) * 100.0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -