📄 peak.cpp
字号:
// file PEAK.CXX
#include "peak.hxx"
#include <math.h>
double PeakFunction :: at (double time)
// Returns the value of the receiver at time 'time'.
{
const double precision = 0.000001 ;
if (! value)
this -> getCoefficients() ;
if (fabs(*t - time) < precision)
return *value ;
else
return 0. ;
}
void PeakFunction :: getCoefficients ()
// Reads the date anf the time increment of the receiver in the data file.
{
t = new double[1] ;
value = new double[1] ;
*t = this -> read("t") ;
*value = this -> read("f(t)") ;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -