幻想森林

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

[脚本] 高斯随机数

[复制链接]

335

主题

782

帖子

1万

积分

版主

Rank: 7Rank: 7Rank: 7

积分
12742
发表于 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.
*
*/

游客,如果您要查看本帖隐藏内容请回复
回复

使用道具 举报

0

主题

10

帖子

80

积分

②入门

积分
80
发表于 2011-10-4 23:02:47 | 显示全部楼层
好 看看
回复 支持 反对

使用道具 举报

550

主题

9116

帖子

214748万

积分

超级版主

如同神一般的存在,腿神!拖后腿的神~~

Rank: 8Rank: 8

积分
2147483647
发表于 2011-10-6 14:37:46 | 显示全部楼层
回复可见
我就是你们的神,庶民们,追随我吧!跟着我一起拖后腿!
回复 支持 反对

使用道具 举报

0

主题

10

帖子

80

积分

②入门

积分
80
发表于 2011-10-18 18:37:59 | 显示全部楼层
我正愁这个呢~~~··
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-4-17 06:26 , Processed in 0.020177 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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