📄 utilities.h
字号:
/*************************************************************************** utilities.h - description ------------------- begin : Wed May 22 2002 copyright : (C) 2002 by Rdiger Koch email : rkoch@rkoch.org ***************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/#ifndef UTILITIES_H#define UTILITIES_H#include <string>#include <cmath>#include <amygdala/amygdalaclass.h>/** * @brief wrap some useful functions and classes * wrap some useful functions and classes not directly related to the core * of Amygdala */namespace Utilities { using Amygdala::AmTimeInt; using std::string; /** @return a random number between 0. and 100. */ float RandPercent(); float GaussRand(float mean, float sigma); /** @return a string representation of an integer */ string itostr(int val); /** @return a string representation of a float */ string ftostr(float val); /** Round the time to the nearest time step. * @param time Reference to the time value that will be rounded. * @param stepSize Size of the simulation time step. */ void RoundTime(AmTimeInt& time, const AmTimeInt& stepSize);}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -