找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 3824|回复: 3

[脚本] 高斯随机数

[复制链接]
发表于 2009-9-19 12:51:01 | 显示全部楼层 |阅读模式
即均值为0方差为1的随机数。做高阶拟真游戏会用到。

/*  gauss_random(mean,standard deviation)
* Implements the Polar form of the Box-Muller Transformation
*
* © Copyright 1994, Everett F. Carter Jr.
*     Ported to GML by Tsa05
* Permission is granted by the author to use
* this software for any application provided this
* copyright notice is preserved.
*  
* m = mean, s = standard deviation, return = double
* Recall that numbers beyond the Standard Deviation
* are possible (just not probable), and should be accounted for.
*
*/

游客,如果您要查看本帖隐藏内容请回复
发表于 2011-10-4 23:02:47 | 显示全部楼层
好 看看
发表于 2011-10-6 14:37:46 | 显示全部楼层
回复可见
发表于 2011-10-18 18:37:59 | 显示全部楼层
我正愁这个呢~~~··
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|幻想森林

GMT+8, 2026-10-26 13:33 , Processed in 0.011557 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表