diff options
author | Hans Goudey <h.goudey@me.com> | 2022-03-24 07:01:02 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-03-24 07:05:46 +0300 |
commit | e253f9f66d6f63592ffd97afe207ef7c72547d03 (patch) | |
tree | 9a9345ab1184f0f6fda51740967595cc2f52a4bf /source/blender/blenkernel/intern/curve_catmull_rom.cc | |
parent | a1598d6835d0c579579881bca900f9259b26d11a (diff) |
Cleanup: Adjust naming in new curves code
Rename "size" variables and functions to use "num" instead,
based on T85728 (though this doesn't apply to simple C++
containers, it applies here). Rename "range" to "points" in
some functions, so be more specific.
Differential Revision: https://developer.blender.org/D14431
Diffstat (limited to 'source/blender/blenkernel/intern/curve_catmull_rom.cc')
-rw-r--r-- | source/blender/blenkernel/intern/curve_catmull_rom.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/curve_catmull_rom.cc b/source/blender/blenkernel/intern/curve_catmull_rom.cc index 27687eb736f..5b6d0cac21f 100644 --- a/source/blender/blenkernel/intern/curve_catmull_rom.cc +++ b/source/blender/blenkernel/intern/curve_catmull_rom.cc @@ -9,11 +9,11 @@ namespace blender::bke::curves::catmull_rom { -int calculate_evaluated_size(const int size, const bool cyclic, const int resolution) +int calculate_evaluated_size(const int num_points, const bool cyclic, const int resolution) { - const int eval_size = resolution * curve_segment_size(size, cyclic); + const int eval_size = resolution * curve_segment_size(num_points, cyclic); /* If the curve isn't cyclic, one last point is added to the final point. */ - return (cyclic && size > 2) ? eval_size : eval_size + 1; + return (cyclic && num_points > 2) ? eval_size : eval_size + 1; } /* Adapted from Cycles #catmull_rom_basis_eval function. */ |