import std.math; import atmosphere.pdf; real fun(real x) { // 1/sqrt(2 PI) enum c = 0.398942280401432677939946L; return c * exp(-0.5f * x * x); } PDF!real pdf = convertTo!PDF(&fun);
See Implementation