Scarfy Rectangle Casting Error

I’m not sure why this is a problem or how to resolve the error. I was able to add (.0f) to the other fields to resolve similar problems.

Thanks in advance for your time,
Trevor

I was able to remove the problem by multiplying (scarfy.height * 1.0f), however I’m not sure how good of a solution this is.

This isn’t great but will be fine for now. The instructor will go more into different ways of casting later, so that you can use ints as floats without risk of losing precision.

1 Like

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

Privacy & Terms