Instead of initializing a variable to return, you can return directly:
Code:
Return New Double() {m, r}
Instead of
Code:
 rSquared = r ^ 2
try
Code:
r=r*r
(ya I know it's minor)