예제 #1
0
 // Sampled a N-sample probability density function in the range [-1024..1024, -1024..1024]
 // 1 sample produces a rectangular probability
 // 2 samples produces a triangular probability
 // ...
 // N samples approximates a true gaussian
 public static WVec FromPDF(MersenneTwister r, int samples)
 {
     return(new WVec(WRange.FromPDF(r, samples), WRange.FromPDF(r, samples), WRange.Zero));
 }
예제 #2
0
파일: WVec.cs 프로젝트: xbayrockx/OpenRA
 // Sampled a N-sample probability density function in the range [-1024..1024, -1024..1024]
 // 1 sample produces a rectangular probability
 // 2 samples produces a triangular probability
 // ...
 // N samples approximates a true gaussian
 public static WVec FromPDF(Thirdparty.Random r, int samples)
 {
     return(new WVec(WRange.FromPDF(r, samples), WRange.FromPDF(r, samples), WRange.Zero));
 }