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>2019-08-05 21:34:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-05 21:35:22 +0300
commit17f299c5d14f0435595afe51c4153ae4037bb81b (patch)
tree6d44ff78a6cc639f1041a9d7ac3044c2bb814952 /source/blender/blenlib/intern/math_geom.c
parentad417f73c0dcc5eda2ba211617ef24bca81f7c75 (diff)
Cleanup: quiet cast warnings in recent commit
Diffstat (limited to 'source/blender/blenlib/intern/math_geom.c')
-rw-r--r--source/blender/blenlib/intern/math_geom.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 6f71551d4a0..b4a96ff316a 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -4481,7 +4481,8 @@ void projmat_dimensions(const float projmat[4][4],
}
}
-/* Creates a projection matrix for a small region of the viewport.
+/**
+ * Creates a projection matrix for a small region of the viewport.
*
* \param projmat: Projection Matrix.
* \param win_size: Viewport Size.
@@ -4499,12 +4500,12 @@ void projmat_from_subregion(const float projmat[4][4],
float rect_width = (float)(x_max - x_min);
float rect_height = (float)(y_max - y_min);
- float x_fac = ((x_min + x_max) - win_size[0]) / rect_width;
- float y_fac = ((y_min + y_max) - win_size[1]) / rect_height;
+ float x_fac = (float)((x_min + x_max) - win_size[0]) / rect_width;
+ float y_fac = (float)((y_min + y_max) - win_size[1]) / rect_height;
copy_m4_m4(r_projmat, projmat);
- r_projmat[0][0] *= (win_size[0] / rect_width);
- r_projmat[1][1] *= (win_size[1] / rect_height);
+ r_projmat[0][0] *= (float)win_size[0] / rect_width;
+ r_projmat[1][1] *= (float)win_size[1] / rect_height;
#if 0 /* TODO: check if this is more efficient. */
r_projmat[2][0] -= x_fac * r_projmat[2][3];