Skip to content

Conversation

@923132714
Copy link
Contributor

原因是 countEnergyChangeRatio 一个 tick 多次调用,totalEnergy总被置NAN 导致 expect一直不正常。
但为什么多次调用会为nan仍未明确,希望大佬 @LokiSharp 能看出原因
解决方法是如果当前tick调用过就直接返回结果,我觉得就算没这个问题也应该如此做减少计算量

原因是 countEnergyChangeRatio 一个 tick 多次调用,totalEnergy总被置NAN 导致 expect一直不正常。
但为什么多次调用会为nan仍未明确,希望大佬 @LokiSharp 能看出原因
解决方法是如果当前tick调用过就直接返回结果,我觉得就算没这个问题也应该如此做减少计算量
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant