Prevent divide by zero. Issue #7100

Fix for issue #7100 
Style nit: These parens are unnecessary.