From b24a1bcab389c0aefc1ddea9a1b81880f699df56 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 27 Jul 2021 12:20:17 +0200 Subject: Drop redundant check If value is not approximately equal to zero, its square root also is not Change-Id: I0a2c30a8a85c64406e3a8ea8cff2315f25c2226d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119444 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- basegfx/source/vector/b3dvector.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'basegfx') diff --git a/basegfx/source/vector/b3dvector.cxx b/basegfx/source/vector/b3dvector.cxx index 7dd5acf57f36..002ee330f9f4 100644 --- a/basegfx/source/vector/b3dvector.cxx +++ b/basegfx/source/vector/b3dvector.cxx @@ -34,12 +34,9 @@ namespace basegfx { fLen = sqrt(fLen); - if(!::basegfx::fTools::equalZero(fLen)) - { - mfX /= fLen; - mfY /= fLen; - mfZ /= fLen; - } + mfX /= fLen; + mfY /= fLen; + mfZ /= fLen; } } -- cgit