Comments and answers for "My simple math operation is returning infinity and I can't figure out why."
http://answers.unity.com/questions/1505062/my-simple-math-operation-is-returning-infinity-and.html
The latest comments and answers for the question "My simple math operation is returning infinity and I can't figure out why."Comment by tmarshall619 on tmarshall619's answer
http://answers.unity.com/comments/1505107/view.html
Thanks, the apparent issue was that slowSizeDuration was initialized to 0 and continued to be computed as such, even after the value was changed in a later function call.Fri, 11 May 2018 18:20:21 GMTtmarshall619Answer by tormentoarmagedoom
http://answers.unity.com/answers/1505102/view.html
Good day.
If slowSizeTimer is giving infinity, slowSizeDuration is causing it. And we dont see where it comes from.Fri, 11 May 2018 18:01:52 GMTtormentoarmagedoomComment by taylank
http://answers.unity.com/comments/1505083/view.html
Can you share how and where you're setting slowSizeDuration? Is it int or float? The two possible reasons that spring to mind are:
1) It is set to zero somehow (either not initialized in code, or set zero in the inspector)
2) It is defined as an int or calculated as an int / int division which is getting rounded down to zero.Fri, 11 May 2018 17:24:55 GMTtaylank