Hacker News new | ask | show | jobs
by voidUpdate 734 days ago
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