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>
| commit | 22090b374f1f6e53a28188f91cca8b860c859555 |
| parent | a30343fe6aa4c15fcee4a14eabe45473a88056db |
| author | Edward Welbourne <edward.welbourne@qt.io> |
| committer | Edward Welbourne <edward.welbourne@qt.io> |
| commit time | Tue, 21 Mar 2017 13:23:11 +0000 |