diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-26 03:56:05 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-26 04:33:22 +0300 |
commit | 3961d3493be9c666850e71abe6102f72d3db9332 (patch) | |
tree | 83b903f8040f6384cbd4f702546db52a02bcd3dc /source/blender/blenlib/intern/convexhull_2d.c | |
parent | 3a7dc572dc9bbad35bdff3a3aeca8eab0ccb3fb7 (diff) |
Cleanup: use 'u' prefixed integer types for brevity in C code
This also simplifies using function style casts when moving to C++.
Diffstat (limited to 'source/blender/blenlib/intern/convexhull_2d.c')
-rw-r--r-- | source/blender/blenlib/intern/convexhull_2d.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/convexhull_2d.c b/source/blender/blenlib/intern/convexhull_2d.c index 33d1a68a76e..ee5d000b72f 100644 --- a/source/blender/blenlib/intern/convexhull_2d.c +++ b/source/blender/blenlib/intern/convexhull_2d.c @@ -202,9 +202,9 @@ int BLI_convexhull_2d(const float (*points)[2], const int n, int r_points[]) /** \name Utility Convex-Hull Functions * \{ */ -float BLI_convexhull_aabb_fit_hull_2d(const float (*points_hull)[2], unsigned int n) +float BLI_convexhull_aabb_fit_hull_2d(const float (*points_hull)[2], uint n) { - unsigned int i, i_prev; + uint i, i_prev; float area_best = FLT_MAX; float dvec_best[2]; /* best angle, delay atan2 */ @@ -218,7 +218,7 @@ float BLI_convexhull_aabb_fit_hull_2d(const float (*points_hull)[2], unsigned in if (normalize_v2(dvec) != 0.0f) { /* rotation matrix */ float min[2] = {FLT_MAX, FLT_MAX}, max[2] = {-FLT_MAX, -FLT_MAX}; - unsigned int j; + uint j; float area; for (j = 0; j < n; j++) { @@ -249,7 +249,7 @@ float BLI_convexhull_aabb_fit_hull_2d(const float (*points_hull)[2], unsigned in return (area_best != FLT_MAX) ? atan2f(dvec_best[0], dvec_best[1]) : 0.0f; } -float BLI_convexhull_aabb_fit_points_2d(const float (*points)[2], unsigned int n) +float BLI_convexhull_aabb_fit_points_2d(const float (*points)[2], uint n) { int *index_map; int points_hull_num; @@ -269,7 +269,7 @@ float BLI_convexhull_aabb_fit_points_2d(const float (*points)[2], unsigned int n copy_v2_v2(points_hull[j], points[index_map[j]]); } - angle = BLI_convexhull_aabb_fit_hull_2d(points_hull, (unsigned int)points_hull_num); + angle = BLI_convexhull_aabb_fit_hull_2d(points_hull, (uint)points_hull_num); MEM_freeN(points_hull); } else { |