diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 11:33:28 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 13:17:08 +0300 |
commit | f68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch) | |
tree | 2878e5b80dba5bdeba186d99661d604eb38879cd /source/blender/blenlib/tests/BLI_kdopbvh_test.cc | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/blenlib/tests/BLI_kdopbvh_test.cc')
-rw-r--r-- | source/blender/blenlib/tests/BLI_kdopbvh_test.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/tests/BLI_kdopbvh_test.cc b/source/blender/blenlib/tests/BLI_kdopbvh_test.cc index 756219cd733..83eeabaea40 100644 --- a/source/blender/blenlib/tests/BLI_kdopbvh_test.cc +++ b/source/blender/blenlib/tests/BLI_kdopbvh_test.cc @@ -18,7 +18,7 @@ static void rng_v3_round(float *coords, int coords_len, struct RNG *rng, int rou { for (int i = 0; i < coords_len; i++) { float f = BLI_rng_get_float(rng) * 2.0f - 1.0f; - coords[i] = ((float)((int)(f * round)) / (float)round) * scale; + coords[i] = (float(int(f * round)) / float(round)) * scale; } } @@ -90,7 +90,7 @@ static void find_nearest_points_test( if (j != i) { #if 0 const float dist = len_v3v3(points[i], points[j]); - if (dist > (1.0f / (float)round)) { + if (dist > (1.0f / float(round))) { printf("%.15f (%d %d)\n", dist, i, j); print_v3_id(points[i]); print_v3_id(points[j]); |