ezinc.c
来自「国外一大学教授讲章」· C语言 代码 · 共 28 行
C
28 行
#include "ezinc.h"/* global variables -- but private to this file */static double delay, width=0, cdtds;/* prompt user for source-function width and delay. */void ezIncInit(Grid *g){ cdtds = Cdtds; printf("Enter delay: "); scanf(" %lf",&delay); printf("Enter width: "); scanf(" %lf",&width); return;}/* calculate source function at given time and location */double ezInc(double time, double location) { if (width<=0) { fprintf(stderr, "ezInc: must call ezIncInit before ezInc.\n" " Width must be positive.\n"); exit(-1); } return exp( -pow( (time - delay - location/cdtds)/width, 2) );}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?