diff options
author | Thiep Ha <thiepha@gmail.com> | 2017-08-11 14:17:58 +0900 |
---|---|---|
committer | Thiep Ha <thiepha@gmail.com> | 2017-08-11 14:20:10 +0900 |
commit | 92c26078c779343df12e8bf0f6b2ccc6ef645cb9 (patch) | |
tree | f6242297d8896d690d91e3a371250757bc46d491 | |
parent | c208e1b8bf27e79fe7af8a6106f2776df6563e71 (diff) | |
download | efl-92c26078c779343df12e8bf0f6b2ccc6ef645cb9.tar.gz |
common3d: correct converting number to float
-rw-r--r-- | src/lib/evas/common3d/primitives/solids_of_revolution/cone.c | 2 | ||||
-rw-r--r-- | 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; } } |