From ed04c213745362fcab99cdda89343aca7cbb65e5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 28 Feb 2012 14:05:00 +0000 Subject: code cleanup: use float vector size in function definitions, and const's where the values are unchanged. --- source/blender/editors/interface/view2d.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/interface/view2d.c') diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 3eb8aba7334..4d2a1b69293 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -1870,22 +1870,22 @@ void UI_view2d_listview_visible_cells(View2D *v2d, short columnwidth, short rowh * - x,y = coordinates to convert * - viewx,viewy = resultant coordinates */ -void UI_view2d_region_to_view(View2D *v2d, int x, int y, float *viewx, float *viewy) +void UI_view2d_region_to_view(View2D *v2d, int x, int y, float *r_viewx, float *r_viewy) { float div, ofs; - if (viewx) { + if (r_viewx) { div= (float)(v2d->mask.xmax - v2d->mask.xmin); ofs= (float)v2d->mask.xmin; - *viewx= v2d->cur.xmin + (v2d->cur.xmax-v2d->cur.xmin) * ((float)x - ofs) / div; + *r_viewx= v2d->cur.xmin + (v2d->cur.xmax-v2d->cur.xmin) * ((float)x - ofs) / div; } - if (viewy) { + if (r_viewy) { div= (float)(v2d->mask.ymax - v2d->mask.ymin); ofs= (float)v2d->mask.ymin; - *viewy= v2d->cur.ymin + (v2d->cur.ymax - v2d->cur.ymin) * ((float)y - ofs) / div; + *r_viewy= v2d->cur.ymin + (v2d->cur.ymax - v2d->cur.ymin) * ((float)y - ofs) / div; } } -- cgit v1.2.3