add is_quad_convex_v2(), SET_UINT_IN_POINTER, GET_UINT_FROM_POINTER macros & some...
[blender.git] / source / blender / editors / sculpt_paint / paint_image.c
index 5e46a28a3b75ed9ec72707d9d323d54ae99ca845..9746ba6dfa15ef8faeab7974df782887886c60a5 100644 (file)
@@ -560,14 +560,14 @@ static int project_bucket_offset(const ProjPaintState *ps, const float projCoSS[
         * ps->bucketRect[x + (y*ps->buckets_y)] */
        
        /* please explain?
-        * projCoSS[0] - ps->screenMin[0]       : zero origin
-        * ... / ps->screen_width                               : range from 0.0 to 1.0
-        * ... * ps->buckets_x          : use as a bucket index
+        * projCoSS[0] - ps->screenMin[0]   : zero origin
+        * ... / ps->screen_width           : range from 0.0 to 1.0
+        * ... * ps->buckets_x              : use as a bucket index
         *
         * Second multiplication does similar but for vertical offset
         */
-       return (   (int)(((projCoSS[0] - ps->screenMin[0]) / ps->screen_width)  * ps->buckets_x)) +
-              (   (   (int)(((projCoSS[1] - ps->screenMin[1])  / ps->screen_height) * ps->buckets_y)) * ps->buckets_x);
+       return ( (int)(((projCoSS[0] - ps->screenMin[0]) / ps->screen_width)  * ps->buckets_x)) +
+              (((int)(((projCoSS[1] - ps->screenMin[1]) / ps->screen_height) * ps->buckets_y)) * ps->buckets_x);
 }
 
 static int project_bucket_offset_safe(const ProjPaintState *ps, const float projCoSS[2])