Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-02-28 18:05:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-28 18:05:00 +0400
commited04c213745362fcab99cdda89343aca7cbb65e5 (patch)
treee1a6819df36bca9a884104882a2d146da1ba4c89 /source/blender/editors/interface/view2d.c
parent150cedac5da7bfce5fdd7c621cb682d6f3e66c8b (diff)
code cleanup: use float vector size in function definitions, and const's where the values are unchanged.
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r--source/blender/editors/interface/view2d.c10
1 files changed, 5 insertions, 5 deletions
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;
}
}