summaryrefslogtreecommitdiff
path: root/src/lib/evas/common3d
diff options
context:
space:
mode:
authorThiep Ha <thiepha@gmail.com>2017-08-11 14:17:58 +0900
committerThiep Ha <thiepha@gmail.com>2017-08-11 14:20:10 +0900
commit92c26078c779343df12e8bf0f6b2ccc6ef645cb9 (patch)
treef6242297d8896d690d91e3a371250757bc46d491 /src/lib/evas/common3d
parentc208e1b8bf27e79fe7af8a6106f2776df6563e71 (diff)
common3d: correct converting number to float
Diffstat (limited to 'src/lib/evas/common3d')
-rw-r--r--src/lib/evas/common3d/primitives/solids_of_revolution/cone.c2
-rw-r--r--src/lib/evas/common3d/primitives/solids_of_revolution/cylinder.c6
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,
53 tangents[num].z = 0.0; 53 tangents[num].z = 0.0;
54 54
55 tex_coord[num].x = i / (float)(vccount - 1) * tex_scale.x; 55 tex_coord[num].x = i / (float)(vccount - 1) * tex_scale.x;
56 tex_coord[num].y = (float)((j + 1) / 2) * tex_scale.y / 2.0; 56 tex_coord[num].y = ((j + 1) / 2.0) * tex_scale.y / 2.0;
57 } 57 }
58 } 58 }
59 59
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,
26 { 26 {
27 num = i + j * vccount; 27 num = i + j * vccount;
28 28
29 vertices[num].z = -0.5 + (float)(j / 3); 29 vertices[num].z = -0.5 + j / 3.0;
30 if ((j == 0) || (j == 5)) 30 if ((j == 0) || (j == 5))
31 { 31 {
32 vertices[num].x = vertices[num].y = 0.0; 32 vertices[num].x = vertices[num].y = 0.0;
@@ -46,7 +46,7 @@ _set_default_cylinder(Evas_Canvas3D_Mesh *mesh,
46 else 46 else
47 { 47 {
48 normals[num].x = normals[num].y = 0.0; 48 normals[num].x = normals[num].y = 0.0;
49 normals[num].z = -1.0 + (float)(j / 2); 49 normals[num].z = -1.0 + j / 2.0;
50 } 50 }
51 51
52 tangents[num].x = cosfi; 52 tangents[num].x = cosfi;
@@ -54,7 +54,7 @@ _set_default_cylinder(Evas_Canvas3D_Mesh *mesh,
54 tangents[num].z = 0.0; 54 tangents[num].z = 0.0;
55 55
56 tex_coord[num].x = i / (float)(vccount - 1) * tex_scale.x; 56 tex_coord[num].x = i / (float)(vccount - 1) * tex_scale.x;
57 tex_coord[num].y = (float)((j + 1) / 2) * tex_scale.y / 3.0; 57 tex_coord[num].y = ((j + 1) / 2.0) * tex_scale.y / 3.0;
58 } 58 }
59 } 59 }
60 60