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>2012-08-03 01:17:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-03 01:17:12 +0400
commite86e5074f6d4fdc455d64cc362f6b4f5005f79b8 (patch)
tree51ce01cb90655f8cae7c2e481def7caaca01703a /source/gameengine/Ketsji/KX_Dome.cpp
parent1a5998bc4ecaf23db4dbcf41d3872019944c74ac (diff)
code cleanup: double promotion warnings
Diffstat (limited to 'source/gameengine/Ketsji/KX_Dome.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_Dome.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp
index d87bb937b41..44c9cb1dab8 100644
--- a/source/gameengine/Ketsji/KX_Dome.cpp
+++ b/source/gameengine/Ketsji/KX_Dome.cpp
@@ -748,10 +748,10 @@ void KX_Dome::CreateMeshDome250(void)
* Once we take the tangent of that angle, you have the verts coordinate corresponding to the verts on the side faces.
* Then we need to multiply it by sqrt(2.0) to get the coordinate of the verts on the diagonal of the original cube.
*/
- verts_height = tan((rad_ang/2) - (MT_PI/2))*M_SQRT2;
+ verts_height = tanf((rad_ang / 2.0f) - (float)(MT_PI / 2.0)) * (float)M_SQRT2;
- uv_height = uv_ratio * ((verts_height/2) + 0.5);
- uv_base = uv_ratio * (1.0 - ((verts_height/2) + 0.5));
+ uv_height = uv_ratio * ( (verts_height / 2.0f) + 0.5f);
+ uv_base = uv_ratio * (1.0 - ((verts_height / 2.0f) + 0.5f));
//creating faces for the env mapcube 180deg Dome
// Front Face - 2 triangles
@@ -1325,7 +1325,7 @@ void KX_Dome::FlattenDome(MT_Vector3 verts[3])
for (int i=0;i<3;i++) {
r = atan2(sqrt(verts[i][0]*verts[i][0] + verts[i][2]*verts[i][2]), verts[i][1]);
- r /= m_radangle/2;
+ r /= (double)this->m_radangle / 2.0;
phi = atan2(verts[i][2], verts[i][0]);
@@ -1818,13 +1818,13 @@ void KX_Dome::DrawDomeFisheye(void)
else if (m_mode == DOME_TRUNCATED_FRONT)
{
ortho_width = 1.0;
- ortho_height = 2 * ((float)can_height / can_width) - 1.0;
+ ortho_height = 2.0f * ((float)can_height / can_width) - 1.0f;
glOrtho((-ortho_width), ortho_width, (-ortho_height), ortho_width, -20.0, 10.0);
}
else { //m_mode == DOME_TRUNCATED_REAR
ortho_width = 1.0;
- ortho_height = 2 * ((float)can_height / can_width) - 1.0;
+ ortho_height = 2.0f * ((float)can_height / can_width) - 1.0f;
glOrtho((-ortho_width), ortho_width, (-ortho_width), ortho_height, -20.0, 10.0);
}
@@ -1905,8 +1905,8 @@ void KX_Dome::DrawPanorama(void)
ortho_height = (float)can_height/can_width;
}
else {
- ortho_width = (float)can_width/can_height * 0.5;
- ortho_height = 0.5;
+ ortho_width = (float)can_width / can_height * 0.5f;
+ ortho_height = 0.5f;
}
glOrtho((-ortho_width), ortho_width, (-ortho_height), ortho_height, -20.0, 10.0);