CodingTrain / CodingTrain/Coding-Challenges

145_Ray_Casting - optimice performance by using square distance

未关闭
#15 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
189
派生
86
PR 合并指标
30 天内没有已合并 PR

描述

when using dist only for compare, its better to use the `square distance`. Because otherwise quare-root needs to be calculated which is much more cpu heavy.

https://github.com/CodingTrain/Coding-Challenges/blob/2a9d68112b1aa80cbd5aa303f1d97dda7b045fde/145_Ray_Casting/P5/particle.js#L29

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。