For some reason Unity isn’t dividing something correctly. Here is the example:
Debug.Log(Camera.main.pixelWidth);
Debug.Log(Camera.main.pixelHeight);
Debug.Log(Camera.main.pixelWidth / Camera.main.pixelHeight);
The first debug is returning a value of 625. The second debug is returning a value of 352. But the last debug for some reason is returning a value of 1. Why is it returning 1? It doesn’t seem to be a rounding problem because if Unity were rounding 625/352 it would be debugging a 2 (because 625/352 is 1.78 which is closer to a 2 than a 1). Is there a way to make unity divide this correctly in C#?