From 6f4f9aa6ded6da027c84cc466c767334dc3d3362 Mon Sep 17 00:00:00 2001 From: Ferenc Arn Date: Sat, 14 Jan 2017 14:35:39 -0600 Subject: Overloaded basic math funcs (double and float variants). Use real_t rather than float or double in generic functions (core/math) whenever possible. Also inlined some more math functions. --- scene/3d/gi_probe.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scene/3d/gi_probe.cpp') diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 8035ce1cc7..b29ae211de 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -510,8 +510,8 @@ void GIProbe::_plot_face(int p_idx, int p_level,int p_x,int p_y,int p_z, const V Vector2 uv = get_uv(intersection,p_vtx,p_uv); - int uv_x = CLAMP(Math::fposmod(uv.x,1.0)*bake_texture_size,0,bake_texture_size-1); - int uv_y = CLAMP(Math::fposmod(uv.y,1.0)*bake_texture_size,0,bake_texture_size-1); + int uv_x = CLAMP(Math::fposmod(uv.x,1.0f)*bake_texture_size,0,bake_texture_size-1); + int uv_y = CLAMP(Math::fposmod(uv.y,1.0f)*bake_texture_size,0,bake_texture_size-1); int ofs = uv_y*bake_texture_size+uv_x; albedo_accum.r+=p_material.albedo[ofs].r; @@ -539,8 +539,8 @@ void GIProbe::_plot_face(int p_idx, int p_level,int p_x,int p_y,int p_z, const V Vector2 uv = get_uv(inters,p_vtx,p_uv); - int uv_x = CLAMP(Math::fposmod(uv.x,1.0)*bake_texture_size,0,bake_texture_size-1); - int uv_y = CLAMP(Math::fposmod(uv.y,1.0)*bake_texture_size,0,bake_texture_size-1); + int uv_x = CLAMP(Math::fposmod(uv.x,1.0f)*bake_texture_size,0,bake_texture_size-1); + int uv_y = CLAMP(Math::fposmod(uv.y,1.0f)*bake_texture_size,0,bake_texture_size-1); int ofs = uv_y*bake_texture_size+uv_x; -- cgit v1.2.3