diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-25 10:45:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-25 10:45:04 +0300 |
commit | 2a6e4f71576ebee19f34fd5f7c214fd2e9f060f8 (patch) | |
tree | 8354fd06c442d35d4d7e8df9cfb762e45b370188 /source/blender/draw/intern/draw_cache.c | |
parent | a79252d8c732569bb99dd5928708ccee72100e83 (diff) |
Cleanup: style
Diffstat (limited to 'source/blender/draw/intern/draw_cache.c')
-rw-r--r-- | source/blender/draw/intern/draw_cache.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index 96edb7cd429..a8d3b4294a0 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -1169,18 +1169,18 @@ Gwn_Batch *DRW_cache_lamp_area_disk_get(void) } Gwn_VertBuf *vbo = GWN_vertbuf_create_with_format(&format); - GWN_vertbuf_data_alloc(vbo, 2*NSEGMENTS); + GWN_vertbuf_data_alloc(vbo, 2 * NSEGMENTS); float v[3] = {0.0f, 0.5f, 0.0f}; GWN_vertbuf_attr_set(vbo, attr_id.pos, 0, v); for (int a = 1; a < NSEGMENTS; a++) { - v[0] = 0.5f*sinf(2.f * (float)M_PI * a / NSEGMENTS); - v[1] = 0.5f*cosf(2.f * (float)M_PI * a / NSEGMENTS); - GWN_vertbuf_attr_set(vbo, attr_id.pos, 2*a-1, v); - GWN_vertbuf_attr_set(vbo, attr_id.pos, 2*a, v); + v[0] = 0.5f * sinf(2.0f * (float)M_PI * a / NSEGMENTS); + v[1] = 0.5f * cosf(2.0f * (float)M_PI * a / NSEGMENTS); + GWN_vertbuf_attr_set(vbo, attr_id.pos, 2 * a - 1, v); + GWN_vertbuf_attr_set(vbo, attr_id.pos, 2 * a, v); } copy_v3_fl3(v, 0.0f, 0.5f, 0.0f); - GWN_vertbuf_attr_set(vbo, attr_id.pos, 2*NSEGMENTS-1, v); + GWN_vertbuf_attr_set(vbo, attr_id.pos, (2 * NSEGMENTS) - 1, v); SHC.drw_lamp_area_disk = GWN_batch_create_ex(GWN_PRIM_LINES, vbo, NULL, GWN_BATCH_OWNS_VBO); } |