Have a problem with narrowing conversion of ... from 'int' to 'float'

Hello!
Have this code and I am getting the same warning over and over in AnimData structure…

I wonder why is everything ok in the tutorial yet I am getting those warnings?
I know that I can type (float) to each variable in those rectangle braces, but it is super inefficient.
Is there a solution on how I can manage it?
Thanks!

That warning is happening because when you convert data of type int into type float, you can potentially lose data as the highest value for int is higher than the highest value for float. Therefore you could potentially lose some information. We dont use values that high so there’s no danger for us.

Why that doesn’t show in the lecture, I am not sure. But it could be from a different version of VSCode, the extensions used, or the template.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms