Clarifying braces were added.
if statement was added to make method more readable.
trailing zero was added to double constant.