I guess is it could slightly be for efficiency (though some of the other code isn't that efficient, so I don't know why). Rather than having to get an int, implicitly convert it into a double and then multiply, they just give a double straight off, removing the need for a conversion.