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.
This commit is contained in:
Thomas Dinges
2013-06-02 20:39:32 +00:00
parent 834492489a
commit c5ed6765b9
22 changed files with 74 additions and 75 deletions

View File

@@ -187,7 +187,7 @@ void Mesh::add_face_normals()
float3 v2 = verts_ptr[t.v[2]];
float3 norm = cross(v1 - v0, v2 - v0);
float normlen = len(norm);
float normlen = length(norm);
if(normlen == 0.0f)
fN[i] = make_float3(0.0f, 0.0f, 0.0f);
else