filter/source/svg/presentation_engine.js |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6700f7f5b4eae31bf020e7d073c496c6e67a2397
Author:     Yousef_Rabia <[email protected]>
AuthorDate: Sun Mar 26 21:06:00 2023 +0200
Commit:     Ilmari Lauhakangas <[email protected]>
CommitDate: Wed Mar 29 06:01:09 2023 +0000

    tdf#147906 Use Math.hypot() for Pythagorean addition
    
    Change-Id: I8823038bde51002ea8c02ca7e841aca99f928a58
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149618
    Tested-by: Ilmari Lauhakangas <[email protected]>
    Reviewed-by: Ilmari Lauhakangas <[email protected]>

diff --git a/filter/source/svg/presentation_engine.js 
b/filter/source/svg/presentation_engine.js
index 08fdb283d60b..ba585b6f4b3c 100644
--- a/filter/source/svg/presentation_engine.js
+++ b/filter/source/svg/presentation_engine.js
@@ -763,7 +763,7 @@ function getDistance(p1, p2, props) {
     var x = p2[props[0]] - p1[props[0]],
         y = p2[props[1]] - p1[props[1]];
 
-    return Math.sqrt((x * x) + (y * y));
+    return Math.hypot(x, y);
 }
 
 /**

Reply via email to