use floorf rather than floor for float->float

This commit is contained in:
Vas Crabb 2016-09-28 23:57:34 +10:00
parent ecf1e166fc
commit d7a9eeb64f
3 changed files with 6 additions and 6 deletions

View File

@ -78,8 +78,8 @@ void bgfx_chain::process(render_primitive* prim, int view, int screen, texture_m
screen_device* screen_device = screen_iterator.byindex(screen);
uint16_t screen_count(window.target()->current_view()->screens().count());
uint16_t screen_width(floor(prim->get_quad_width() + 0.5f));
uint16_t screen_height(floor(prim->get_quad_height() + 0.5f));
uint16_t screen_width(floorf(prim->get_quad_width() + 0.5f));
uint16_t screen_height(floorf(prim->get_quad_height() + 0.5f));
uint32_t rotation_type =
(window.target()->orientation() & ROT90) == ROT90 ? 1 :
(window.target()->orientation() & ROT180) == ROT180 ? 2 :

View File

@ -435,8 +435,8 @@ uint32_t chain_manager::handle_screen_chains(uint32_t view, render_primitive *st
continue;
}
uint16_t screen_width(floor(prim->get_full_quad_width() + 0.5f));
uint16_t screen_height(floor(prim->get_full_quad_height() + 0.5f));
uint16_t screen_width(floorf(prim->get_full_quad_width() + 0.5f));
uint16_t screen_height(floorf(prim->get_full_quad_height() + 0.5f));
if (window.swap_xy())
{
std::swap(screen_width, screen_height);

View File

@ -2397,8 +2397,8 @@ void uniform::update()
if (shadersys->curr_poly)
{
float quaddims[2] = {
floor(shadersys->curr_poly->prim_width() + 0.5f),
floor(shadersys->curr_poly->prim_height() + 0.5f) };
floorf(shadersys->curr_poly->prim_width() + 0.5f),
floorf(shadersys->curr_poly->prim_height() + 0.5f) };
m_shader->set_vector("QuadDims", 2, quaddims);
}
break;