Cleanup: quiet cast warnings in recent commit

This commit is contained in:
2019-08-06 04:34:54 +10:00
parent ad417f73c0
commit 17f299c5d1

View File

@@ -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];