diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-03-02 03:00:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-03-02 03:05:34 +0300 |
commit | 56935e23c491db3d1a0b0d1053f82e30af65bd6b (patch) | |
tree | 8a6f29ea62b0180515d15541fd019ec5d2e0a025 /source/blender/editors | |
parent | 2058505da4e52d9fe1920ab11935dfdf99c1edbc (diff) |
cleanup: float/double promotion, redundant casts
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_project.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index e6f61fb4aca..cfe5eb83219 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -1926,7 +1926,7 @@ static void viewmove_apply(ViewOpsData *vod, int x, int y) vod->rv3d->ofs_lock[1] -= ((vod->oldy - y) * 2.0f) / (float)vod->ar->winy; } else if ((vod->rv3d->persp == RV3D_CAMOB) && !ED_view3d_camera_lock_check(vod->v3d, vod->rv3d)) { - const float zoomfac = BKE_screen_view3d_zoom_to_fac((float)vod->rv3d->camzoom) * 2.0f; + const float zoomfac = BKE_screen_view3d_zoom_to_fac(vod->rv3d->camzoom) * 2.0f; vod->rv3d->camdx += (vod->oldx - x) / (vod->ar->winx * zoomfac); vod->rv3d->camdy += (vod->oldy - y) / (vod->ar->winy * zoomfac); CLAMP(vod->rv3d->camdx, -1.0f, 1.0f); diff --git a/source/blender/editors/space_view3d/view3d_project.c b/source/blender/editors/space_view3d/view3d_project.c index 75c1d9dcd22..74e3fde0eec 100644 --- a/source/blender/editors/space_view3d/view3d_project.c +++ b/source/blender/editors/space_view3d/view3d_project.c @@ -497,7 +497,7 @@ void ED_view3d_win_to_3d(const ARegion *ar, const float depth_pt[3], const float float dy = (2.0f * mval[1] / (float)ar->winy) - 1.0f; if (rv3d->persp == RV3D_CAMOB) { /* ortho camera needs offset applied */ - const float zoomfac = BKE_screen_view3d_zoom_to_fac((float)rv3d->camzoom) * 4.0f; + const float zoomfac = BKE_screen_view3d_zoom_to_fac(rv3d->camzoom) * 4.0f; dx += rv3d->camdx * zoomfac; dy += rv3d->camdy * zoomfac; } |