[Bf-blender-cvs] [77ed4651ee2] master: Cleanup: float literals

Campbell Barton noreply at git.blender.org
Fri Sep 23 07:30:07 CEST 2022


Commit: 77ed4651ee28d9df8620c9d794d84a5893ce26ff
Author: Campbell Barton
Date:   Fri Sep 23 15:20:24 2022 +1000
Branches: master
https://developer.blender.org/rB77ed4651ee28d9df8620c9d794d84a5893ce26ff

Cleanup: float literals

===================================================================

M	source/blender/editors/gpencil/gpencil_fill.c
M	source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
M	source/blender/render/intern/texture_margin.cc

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 34f983151d2..775c17e1c98 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -429,7 +429,7 @@ static void gpencil_create_extensions(tGPDfill *tgpf)
       float tan2[3];
       float d1;
       float d2;
-      float total_length = 0.f;
+      float total_length = 0.0f;
       for (int i = 1; i < gps->totpoints; i++) {
         if (i > 1) {
           copy_v3_v3(tan1, tan2);
@@ -448,7 +448,7 @@ static void gpencil_create_extensions(tGPDfill *tgpf)
           sub_v3_v3v3(curvature, tan2, tan1);
           float k = normalize_v3(curvature);
           k /= min_ff(d1, d2);
-          float radius = 1.f / k;
+          float radius = 1.0f / k;
           /*
            * The smaller the radius of curvature, the sharper the corner.
            * The thicker the line, the larger the radius of curvature it
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
index 6e1ac24e21b..423fd70e1e2 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
@@ -914,7 +914,7 @@ static void SCULPT_CURVES_OT_select_grow(wmOperatorType *ot)
                        "Distance",
                        "By how much to grow the selection",
                        -10.0f,
-                       10.f);
+                       10.0f);
   RNA_def_property_subtype(prop, PROP_DISTANCE);
 }
 
diff --git a/source/blender/render/intern/texture_margin.cc b/source/blender/render/intern/texture_margin.cc
index 66ab7ba6e2e..dda9999b843 100644
--- a/source/blender/render/intern/texture_margin.cc
+++ b/source/blender/render/intern/texture_margin.cc
@@ -351,7 +351,7 @@ class TextureMarginMap {
       uint32_t poly = loop_to_poly_map_[otherloop];
 
       if (lookup_pixel(x, y, poly, &destx, &desty, &foundpoly, &found_dist)) {
-        if (mindist < 0.f || found_dist < mindist) {
+        if (mindist < 0.0f || found_dist < mindist) {
           mindist = found_dist;
           *r_other_poly = foundpoly;
           *r_destx = destx;



More information about the Bf-blender-cvs mailing list