1#include "..\include\math\rand.h"
16 const int normal_count = 360;
17 double ccl_num, ccl_s;
18 double ccl_ar[normal_count];
20 for (i = 0; i < normal_count; i++) {
21 ccl_ar[i] = rand() % 1000 / (double)999;
24 ccl_num -= ((double)normal_count * 0.5);
25 ccl_s = 1.0 * (double)normal_count / 12.0;
36 x1 = std::rand() % RAND_MAX / (double)RAND_MAX;
37 x2 = std::rand() % RAND_MAX / (double)RAND_MAX;
38 double ccl_num = std::sqrt(-2 * std::log(x1)) * cos(2 *
NA_PI * x2);
#define NA_API
兼容windows系统与linux系统
double NA_API randNormalWitghBoxMuller()
double NA_API randNormal(double r_me, double sd)
独立同分布的中心极限定理生成正态分布的随机数