diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-05-05 10:08:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-05-05 10:08:29 +0300 |
commit | e5e73ccc901e478e85e312579dd2bc63dfae0292 (patch) | |
tree | 4c62bf16e72b645b11ff74f3af0af80e769c3981 /source/blender/blenlib | |
parent | ea5f9fee8da4086adeb4ce902e9d58c446ef4ac8 (diff) |
Math Lib: rename fill_*, to copy_*
matching convention for fixed length api, eg: copy_v3_fl
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_math_vector.h | 12 | ||||
-rw-r--r-- | source/blender/blenlib/intern/astar.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_interp.c | 8 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_vector.c | 12 |
4 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index 82a2b9c9ab2..04c2baa5359 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -308,7 +308,7 @@ void dist_ensure_v2_v2fl(float v1[2], const float v2[2], const float dist); void axis_sort_v3(const float axis_values[3], int r_axis_order[3]); /***************************** Array Functions *******************************/ -/* attempted to follow fixed length vertex functions. names could be improved*/ +/* follow fixed length vector function conventions. */ double dot_vn_vn(const float *array_src_a, const float *array_src_b, const int size) ATTR_WARN_UNUSED_RESULT; double len_squared_vn(const float *array, const int size) ATTR_WARN_UNUSED_RESULT; float normalize_vn_vn(float *array_tar, const float *array_src, const int size); @@ -329,11 +329,11 @@ void sub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_ void msub_vn_vn(float *array_tar, const float *array_src, const float f, const int size); void msub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const float f, const int size); void interp_vn_vn(float *array_tar, const float *array_src, const float t, const int size); -void fill_vn_i(int *array_tar, const int size, const int val); -void fill_vn_short(short *array_tar, const int size, const short val); -void fill_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val); -void fill_vn_uchar(unsigned char *array_tar, const int size, const unsigned char val); -void fill_vn_fl(float *array_tar, const int size, const float val); +void copy_vn_i(int *array_tar, const int size, const int val); +void copy_vn_short(short *array_tar, const int size, const short val); +void copy_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val); +void copy_vn_uchar(unsigned char *array_tar, const int size, const unsigned char val); +void copy_vn_fl(float *array_tar, const int size, const float val); /**************************** Inline Definitions ******************************/ diff --git a/source/blender/blenlib/intern/astar.c b/source/blender/blenlib/intern/astar.c index b7b41d2497e..311d6dd89ae 100644 --- a/source/blender/blenlib/intern/astar.c +++ b/source/blender/blenlib/intern/astar.c @@ -229,7 +229,7 @@ bool BLI_astar_graph_solve( r_solution->steps = 0; prev_nodes[node_index_src] = -1; BLI_BITMAP_SET_ALL(done_nodes, false, as_graph->node_num); - fill_vn_fl(g_costs, as_graph->node_num, FLT_MAX); + copy_vn_fl(g_costs, as_graph->node_num, FLT_MAX); g_costs[node_index_src] = 0.0f; g_steps[node_index_src] = 0; diff --git a/source/blender/blenlib/intern/math_interp.c b/source/blender/blenlib/intern/math_interp.c index 67850463fe2..b45d8b4c13b 100644 --- a/source/blender/blenlib/intern/math_interp.c +++ b/source/blender/blenlib/intern/math_interp.c @@ -112,10 +112,10 @@ BLI_INLINE void bicubic_interpolation(const unsigned char *byte_buffer, const fl /* sample area entirely outside image? */ if (ceil(u) < 0 || floor(u) > width - 1 || ceil(v) < 0 || floor(v) > height - 1) { if (float_output) { - fill_vn_fl(float_output, components, 0.0f); + copy_vn_fl(float_output, components, 0.0f); } if (byte_output) { - fill_vn_uchar(byte_output, components, 0); + copy_vn_uchar(byte_output, components, 0); } return; } @@ -281,7 +281,7 @@ BLI_INLINE void bilinear_interpolation(const unsigned char *byte_buffer, const f /* sample area entirely outside image? */ if (x2 < 0 || x1 > width - 1 || y2 < 0 || y1 > height - 1) { - fill_vn_fl(float_output, components, 0.0f); + copy_vn_fl(float_output, components, 0.0f); return; } @@ -323,7 +323,7 @@ BLI_INLINE void bilinear_interpolation(const unsigned char *byte_buffer, const f /* sample area entirely outside image? */ if (x2 < 0 || x1 > width - 1 || y2 < 0 || y1 > height - 1) { - fill_vn_uchar(byte_output, components, 0); + copy_vn_uchar(byte_output, components, 0); return; } diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index 8f536bfe75c..88eccd60352 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -876,7 +876,7 @@ float normalize_vn_vn(float *array_tar, const float *array_src, const int size) mul_vn_vn_fl(array_tar, array_src, size, 1.0f / d_sqrt); } else { - fill_vn_fl(array_tar, size, 0.0f); + copy_vn_fl(array_tar, size, 0.0f); d_sqrt = 0.0f; } return d_sqrt; @@ -1051,7 +1051,7 @@ void interp_vn_vn(float *array_tar, const float *array_src, const float t, const } } -void fill_vn_i(int *array_tar, const int size, const int val) +void copy_vn_i(int *array_tar, const int size, const int val) { int *tar = array_tar + (size - 1); int i = size; @@ -1060,7 +1060,7 @@ void fill_vn_i(int *array_tar, const int size, const int val) } } -void fill_vn_short(short *array_tar, const int size, const short val) +void copy_vn_short(short *array_tar, const int size, const short val) { short *tar = array_tar + (size - 1); int i = size; @@ -1069,7 +1069,7 @@ void fill_vn_short(short *array_tar, const int size, const short val) } } -void fill_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val) +void copy_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val) { unsigned short *tar = array_tar + (size - 1); int i = size; @@ -1078,7 +1078,7 @@ void fill_vn_ushort(unsigned short *array_tar, const int size, const unsigned sh } } -void fill_vn_uchar(unsigned char *array_tar, const int size, const unsigned char val) +void copy_vn_uchar(unsigned char *array_tar, const int size, const unsigned char val) { unsigned char *tar = array_tar + (size - 1); int i = size; @@ -1087,7 +1087,7 @@ void fill_vn_uchar(unsigned char *array_tar, const int size, const unsigned char } } -void fill_vn_fl(float *array_tar, const int size, const float val) +void copy_vn_fl(float *array_tar, const int size, const float val) { float *tar = array_tar + (size - 1); int i = size; |