diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2017-03-06 17:36:46 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2017-03-21 13:23:11 +0000 |
commit | 22090b374f1f6e53a28188f91cca8b860c859555 (patch) | |
tree | bdd132c76215eb9dddf15fa151f1cb2590c86f9e /examples/positioning | |
parent | a30343fe6aa4c15fcee4a14eabe45473a88056db (diff) |
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>
Diffstat (limited to 'examples/positioning')
0 files changed, 0 insertions, 0 deletions