数学
thrt_0
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
lua产生正态分布随机数
基于Box–Muller实现的产生符合正态分布随机数的方法 不是很严谨,够用就行了----正态分布随机数 期望值为0.5 范围为0~1math.boxMullerRandom = function() local u = math.random() local v = math.random() local z = math.sqrt(-2 * math....原创 2018-08-17 15:43:30 · 2714 阅读 · 0 评论 -
游戏开发之蜂巢型网格算法
话不多直接上代码local CombGrid = class("CombGrid")---@type CombGridTypeCombGrid.Type = 0---@type numberCombGrid.GridHeight = 0---@type numberCombGrid.GridWidth = 0---@type numberCombGrid.GridCount...原创 2018-08-27 16:44:43 · 1426 阅读 · 0 评论 -
RotateVectorByQuat(四元数旋转向量)
private static Vector3 RotateVectorByQuat(Quaternion lhs, Vector3 rhs) { float x = lhs.x * 2; float y = lhs.y * 2; float z = lhs.z * 2; float xx = lhs.x * x; ...原创 2019-03-28 12:06:48 · 1225 阅读 · 0 评论
分享