Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2013-06-03 00:39:32 +0400
committerThomas Dinges <blender@dingto.org>2013-06-03 00:39:32 +0400
commitc5ed6765b9c46630579be5e43cab74965f0be9da (patch)
tree0ca3bee53bec86f5bb63a005aa4cbfb04e6735a6 /intern/cycles/subd
parent834492489ab9cea37ff32166895b6a298d7225e9 (diff)
Cycles / Math functions:
* Rename some math functions: len -> length len_squared -> length_squared normalize_len -> normalize_length * This way OpenCL uses its inbuilt length() function, rather than our own. The other two functions have been renamed for consistency. * Tested CPU, CUDA and OpenCL compile, should be no functional changes.
Diffstat (limited to 'intern/cycles/subd')
-rw-r--r--intern/cycles/subd/subd_dice.cpp4
-rw-r--r--intern/cycles/subd/subd_split.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/subd/subd_dice.cpp b/intern/cycles/subd/subd_dice.cpp
index 48e6808bc38..0174c139b01 100644
--- a/intern/cycles/subd/subd_dice.cpp
+++ b/intern/cycles/subd/subd_dice.cpp
@@ -98,8 +98,8 @@ void EdgeDice::stitch_triangles(vector<int>& outer, vector<int>& inner)
}
else {
/* length of diagonals */
- float len1 = len(mesh_P[inner[i]] - mesh_P[outer[j+1]]);
- float len2 = len(mesh_P[outer[j]] - mesh_P[inner[i+1]]);
+ float len1 = length(mesh_P[inner[i]] - mesh_P[outer[j+1]]);
+ float len2 = length(mesh_P[outer[j]] - mesh_P[inner[i+1]]);
/* use smallest diagonal */
if(len1 < len2)
diff --git a/intern/cycles/subd/subd_split.cpp b/intern/cycles/subd/subd_split.cpp
index 074c82a2348..cca64822647 100644
--- a/intern/cycles/subd/subd_split.cpp
+++ b/intern/cycles/subd/subd_split.cpp
@@ -74,7 +74,7 @@ int DiagSplit::T(Patch *patch, float2 Pstart, float2 Pend)
float3 P = project(patch, Pstart + t*(Pend - Pstart));
if(i > 0) {
- float L = len(P - Plast);
+ float L = length(P - Plast);
Lsum += L;
Lmax = max(L, Lmax);
}