Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2020-08-12 18:23:20 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-08-12 19:04:06 +0300
commitff4b5d00e4da54b1bcca232211fe17c8a8bf2c49 (patch)
tree235e049fbb176698eb747a2f5a2e2da2a890a9d8 /source/blender/editors/sculpt_paint/sculpt_smooth.c
parent010911d7226894455023f0f1051a0d5fd2b8bb56 (diff)
Cleanup: Remove explicit float casts in sculpt code
Differential Revision: https://developer.blender.org/D8553
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_smooth.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_smooth.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_smooth.c b/source/blender/editors/sculpt_paint/sculpt_smooth.c
index fd4006ce2d3..2b93298ac4a 100644
--- a/source/blender/editors/sculpt_paint/sculpt_smooth.c
+++ b/source/blender/editors/sculpt_paint/sculpt_smooth.c
@@ -150,7 +150,7 @@ void SCULPT_neighbor_coords_average(SculptSession *ss, float result[3], int inde
SCULPT_VERTEX_NEIGHBORS_ITER_END(ni);
if (total > 0) {
- mul_v3_v3fl(result, avg, 1.0f / (float)total);
+ mul_v3_v3fl(result, avg, 1.0f / total);
}
else {
copy_v3_v3(result, SCULPT_vertex_co_get(ss, index));
@@ -170,7 +170,7 @@ float SCULPT_neighbor_mask_average(SculptSession *ss, int index)
SCULPT_VERTEX_NEIGHBORS_ITER_END(ni);
if (total > 0) {
- return avg / (float)total;
+ return avg / total;
}
return SCULPT_vertex_mask_get(ss, index);
}
@@ -188,7 +188,7 @@ void SCULPT_neighbor_color_average(SculptSession *ss, float result[4], int index
SCULPT_VERTEX_NEIGHBORS_ITER_END(ni);
if (total > 0) {
- mul_v4_v4fl(result, avg, 1.0f / (float)total);
+ mul_v4_v4fl(result, avg, 1.0f / total);
}
else {
copy_v4_v4(result, SCULPT_vertex_color_get(ss, index));
@@ -343,7 +343,7 @@ void SCULPT_surface_smooth_displace_step(SculptSession *ss,
}
SCULPT_VERTEX_NEIGHBORS_ITER_END(ni);
if (total > 0) {
- mul_v3_v3fl(b_current_vertex, b_avg, (1.0f - beta) / (float)total);
+ mul_v3_v3fl(b_current_vertex, b_avg, (1.0f - beta) / total);
madd_v3_v3fl(b_current_vertex, laplacian_disp[v_index], beta);
mul_v3_fl(b_current_vertex, clamp_f(fade, 0.0f, 1.0f));
sub_v3_v3(co, b_current_vertex);