more efficient math

/!\ this is only correct if x is always comprised between 0 and width,
and y between 0 and height
declared directly in the diameter property
unnecessary parenthesis removal
Merge pull request #7 from Sheraff/master

more efficient math