diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-08-12 18:23:20 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-08-12 19:04:06 +0300 |
commit | ff4b5d00e4da54b1bcca232211fe17c8a8bf2c49 (patch) | |
tree | 235e049fbb176698eb747a2f5a2e2da2a890a9d8 /source/blender/editors/sculpt_paint/sculpt_filter_mesh.c | |
parent | 010911d7226894455023f0f1051a0d5fd2b8bb56 (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_filter_mesh.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_filter_mesh.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c index 9f6500f1421..f9ae91fce7f 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c @@ -306,7 +306,7 @@ static void mesh_filter_task_cb(void *__restrict userdata, const uint *hash_co = (const uint *)orig_co; const uint hash = BLI_hash_int_2d(hash_co[0], hash_co[1]) ^ BLI_hash_int_2d(hash_co[2], ss->filter_cache->random_seed); - mul_v3_fl(normal, hash * (1.0f / (float)0xFFFFFFFF) - 0.5f); + mul_v3_fl(normal, hash * (1.0f / 0xFFFFFFFF) - 0.5f); mul_v3_v3fl(disp, normal, fade); break; } @@ -435,9 +435,8 @@ static void mesh_filter_sharpen_init_factors(SculptSession *ss) SCULPT_VERTEX_NEIGHBORS_ITER_END(ni); if (total > 0) { - mul_v3_v3fl( - ss->filter_cache->sharpen_detail_directions[i], direction_avg, 1.0f / (float)total); - ss->filter_cache->sharpen_factor[i] = sharpen_avg / (float)total; + mul_v3_v3fl(ss->filter_cache->sharpen_detail_directions[i], direction_avg, 1.0f / total); + ss->filter_cache->sharpen_factor[i] = sharpen_avg / total; } } } |