ALS-Refactored
ALS-Refactored copied to clipboard
Check GroundedAmount with UE_SMALL_NUMBER make it safe not divided by zero
The PoseState.GroundedAmount will used as a denominator. Check with UE_SMALL_NUMBER is better than 0 directly.
Check with UE_SMALL_NUMBER is better than 0 directly.
I'm curious about the reason.
Isn't "Number > 0.0f
" sufficient enough to avoid "divided by zero" error?
Check with UE_SMALL_NUMBER is better than 0 directly.
I'm curious about the reason.
Isn't "
Number > 0.0f
" sufficient enough to avoid "divided by zero" error?
It just keep the same check in other code. For example Here check DeltaTime.
Check with UE_SMALL_NUMBER is better than 0 directly.
I'm curious about the reason. Isn't "
Number > 0.0f
" sufficient enough to avoid "divided by zero" error?It just keep the same check in other code. For example Here check DeltaTime.
Got it, if so, should we do that in all similar places?