I haven't been able to find these rules on a website, (surely because I'm googling the wrong thing) so I'm asking here.
Dividing an int by an int and storing in a double always stores the rounded integer first. The only way I've been able to find to make it work is to cast both values to a double before doing the divide. There's got to be a better way.
Also, where are the rules for the return types?