Re:My Very First Production Bug
by voidUpdate on Thursday June 13, 2024 @03:21AM
(#40666892)
I keep getting hit by this in C#, where int / int = int. So if I'm trying to calculate the aspect ratio of an image (which has been coming up a lot recently), I cant just do width/height, I've got to cast one of them to a float first, because int / float = float
[ Parent
| on HN ]
There are no comments on this comment yet.