diff options
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/capsule_shape.cpp | 4 | ||||
-rw-r--r-- | scene/resources/curve.cpp | 6 | ||||
-rw-r--r-- | scene/resources/sphere_shape.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/scene/resources/capsule_shape.cpp b/scene/resources/capsule_shape.cpp index db83a20f38..23538c1957 100644 --- a/scene/resources/capsule_shape.cpp +++ b/scene/resources/capsule_shape.cpp @@ -42,8 +42,8 @@ Vector<Vector3> CapsuleShape::_gen_debug_mesh_lines() { Vector3 d(0,0,height*0.5); for(int i=0;i<360;i++) { - float ra=Math::deg2rad(i); - float rb=Math::deg2rad(i+1); + float ra=Math::deg2rad((float)i); + float rb=Math::deg2rad((float)i+1); Point2 a = Vector2(Math::sin(ra),Math::cos(ra))*radius; Point2 b = Vector2(Math::sin(rb),Math::cos(rb))*radius; diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp index e201cb16ac..3392c68e75 100644 --- a/scene/resources/curve.cpp +++ b/scene/resources/curve.cpp @@ -498,7 +498,7 @@ Vector2 Curve2D::interpolatef(real_t p_findex) const { else if (p_findex>=points.size()) p_findex=points.size(); - return interpolate((int)p_findex,Math::fmod(p_findex,1.0)); + return interpolate((int)p_findex,Math::fmod(p_findex,(real_t)1.0)); } @@ -653,7 +653,7 @@ Vector2 Curve2D::interpolate_baked(float p_offset,bool p_cubic) const{ return r[bpc-1]; int idx = Math::floor((double)p_offset/(double)bake_interval); - float frac = Math::fmod(p_offset,bake_interval); + float frac = Math::fmod(p_offset,(float)bake_interval); if (idx>=bpc-1) { return r[bpc-1]; @@ -974,7 +974,7 @@ Vector3 Curve3D::interpolatef(real_t p_findex) const { else if (p_findex>=points.size()) p_findex=points.size(); - return interpolate((int)p_findex,Math::fmod(p_findex,1.0)); + return interpolate((int)p_findex,Math::fmod(p_findex,(real_t)1.0)); } diff --git a/scene/resources/sphere_shape.cpp b/scene/resources/sphere_shape.cpp index bcfb164b4c..c7c4d94aad 100644 --- a/scene/resources/sphere_shape.cpp +++ b/scene/resources/sphere_shape.cpp @@ -37,8 +37,8 @@ Vector<Vector3> SphereShape::_gen_debug_mesh_lines() { for(int i=0;i<=360;i++) { - float ra=Math::deg2rad(i); - float rb=Math::deg2rad(i+1); + float ra=Math::deg2rad((float)i); + float rb=Math::deg2rad((float)i+1); Point2 a = Vector2(Math::sin(ra),Math::cos(ra))*r; Point2 b = Vector2(Math::sin(rb),Math::cos(rb))*r; |