thiep pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=92c26078c779343df12e8bf0f6b2ccc6ef645cb9
commit 92c26078c779343df12e8bf0f6b2ccc6ef645cb9 Author: Thiep Ha <thie...@gmail.com> Date: Fri Aug 11 14:17:58 2017 +0900 common3d: correct converting number to float --- src/lib/evas/common3d/primitives/solids_of_revolution/cone.c | 2 +- src/lib/evas/common3d/primitives/solids_of_revolution/cylinder.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/evas/common3d/primitives/solids_of_revolution/cone.c b/src/lib/evas/common3d/primitives/solids_of_revolution/cone.c index 1a27630c21..a2852bb374 100644 --- a/src/lib/evas/common3d/primitives/solids_of_revolution/cone.c +++ b/src/lib/evas/common3d/primitives/solids_of_revolution/cone.c @@ -53,7 +53,7 @@ _set_default_cone(Evas_Canvas3D_Mesh *mesh, tangents[num].z = 0.0; tex_coord[num].x = i / (float)(vccount - 1) * tex_scale.x; - tex_coord[num].y = (float)((j + 1) / 2) * tex_scale.y / 2.0; + tex_coord[num].y = ((j + 1) / 2.0) * tex_scale.y / 2.0; } } diff --git a/src/lib/evas/common3d/primitives/solids_of_revolution/cylinder.c b/src/lib/evas/common3d/primitives/solids_of_revolution/cylinder.c index 5b6e593783..fc0d3d1d92 100644 --- a/src/lib/evas/common3d/primitives/solids_of_revolution/cylinder.c +++ b/src/lib/evas/common3d/primitives/solids_of_revolution/cylinder.c @@ -26,7 +26,7 @@ _set_default_cylinder(Evas_Canvas3D_Mesh *mesh, { num = i + j * vccount; - vertices[num].z = -0.5 + (float)(j / 3); + vertices[num].z = -0.5 + j / 3.0; if ((j == 0) || (j == 5)) { vertices[num].x = vertices[num].y = 0.0; @@ -46,7 +46,7 @@ _set_default_cylinder(Evas_Canvas3D_Mesh *mesh, else { normals[num].x = normals[num].y = 0.0; - normals[num].z = -1.0 + (float)(j / 2); + normals[num].z = -1.0 + j / 2.0; } tangents[num].x = cosfi; @@ -54,7 +54,7 @@ _set_default_cylinder(Evas_Canvas3D_Mesh *mesh, tangents[num].z = 0.0; tex_coord[num].x = i / (float)(vccount - 1) * tex_scale.x; - tex_coord[num].y = (float)((j + 1) / 2) * tex_scale.y / 3.0; + tex_coord[num].y = ((j + 1) / 2.0) * tex_scale.y / 3.0; } } --