drawinglayer/source/primitive2d/texteffectprimitive2d.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c40ad574e720a3d949b96c1171935b383b465d4e
Author:     Daniel <[email protected]>
AuthorDate: Sat Nov 22 20:55:30 2025 -0800
Commit:     Ilmari Lauhakangas <[email protected]>
CommitDate: Mon Nov 24 05:54:24 2025 +0100

    tdf#145759 Replace magic constant 1.44 with M_SQRT2
    
    Replace the hard-coded constant 1.44 (approximation for the square root of 
2)
    with the symbolic constant M_SQRT2.
    
    Change-Id: I4c938cdfe641eb87ad6a3efe076f7932ef728010
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194385
    Tested-by: Jenkins
    Reviewed-by: Ilmari Lauhakangas <[email protected]>

diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx 
b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
index f1bb6812bfd2..aee35edc4811 100644
--- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
@@ -35,7 +35,7 @@ Primitive2DReference 
TextEffectPrimitive2D::create2DDecomposition(
     // have good results on rotated objects, too
     const basegfx::B2DVector 
aDistance(rViewInformation.getInverseObjectToViewTransformation()
                                        * basegfx::B2DVector(fDiscreteSize, 
fDiscreteSize));
-    const basegfx::B2DVector aDiagonalDistance(aDistance * (1.0 / 1.44));
+    const basegfx::B2DVector aDiagonalDistance(aDistance * (1.0 / M_SQRT2));
 
     Primitive2DContainer aContainer;
     switch (getTextEffectStyle2D())

Reply via email to