Simplify a mathematical expression


Squaring a number, doubling it and taking the square root is just a
roundabout way of multiplying the number by sqrt(2); so do that
instead, saving some computational cost and probably reducing the
amount of rounding errors that can creep in.

Change-Id: I1abf3c2de318f48f80536379156ace8f25a6acaf
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
commit22090b374f1f6e53a28188f91cca8b860c859555
parenta30343fe6aa4c15fcee4a14eabe45473a88056db
authorEdward Welbourne <edward.welbourne@qt.io>
committerEdward Welbourne <edward.welbourne@qt.io>
commit timeTue, 21 Mar 2017 13:23:11 +0000