Code cleanup: avoid some warnings due to implicit uint/int/float/double conversion.

This commit is contained in:
Brecht Van Lommel
2013-06-07 16:06:17 +00:00
parent c24be7ec6e
commit d835d2f4e6
23 changed files with 96 additions and 62 deletions

View File

@@ -38,14 +38,14 @@ __device_noinline float2 svm_brick(float3 p, float scale, float mortar_size, flo
float offset = 0.0f;
float x, y;
rownum = (int)floor(p.y / row_height);
rownum = floor_to_int(p.y / row_height);
if(offset_frequency && squash_frequency) {
brick_width *= ((int)(rownum) % squash_frequency ) ? 1.0f : squash_amount; /* squash */
offset = ((int)(rownum) % offset_frequency ) ? 0 : (brick_width*offset_amount); /* offset */
}
bricknum = (int)floor((p.x+offset) / brick_width);
bricknum = floor_to_int((p.x+offset) / brick_width);
x = (p.x+offset) - brick_width*bricknum;
y = p.y - row_height*rownum;