diff options
author | UsernameIsAReservedWord <yoann@terminajones.com> | 2015-01-06 15:31:41 +0100 |
---|---|---|
committer | UsernameIsAReservedWord <yoann@terminajones.com> | 2015-01-06 15:31:41 +0100 |
commit | 996d93f972b61640b71374dcf3585b948661a026 (patch) | |
tree | 83ba2a4dd5479df6d36c13b1a98f7e83e49a9d49 /scene | |
parent | bd0356207631602f35e2111bc73bca2bd53e91a1 (diff) |
fixes CurveXD::interpolatef()
fixes Curve2D::interpolatef() and Curve3D::interpolatef() methods
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/curve.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp index ae2c07ff56..6c27ffc6d9 100644 --- a/scene/resources/curve.cpp +++ b/scene/resources/curve.cpp @@ -134,7 +134,7 @@ Vector2 Curve2D::interpolate(int p_index, float p_offset) const { Vector2 Curve2D::interpolatef(real_t p_findex) const { - if (p_findex>0) + if (p_findex<0) p_findex=0; else if (p_findex>=points.size()) p_findex=points.size(); @@ -485,7 +485,7 @@ Vector2 Curve2D::interpolate(int p_index, float p_offset) const { Vector2 Curve2D::interpolatef(real_t p_findex) const { - if (p_findex>0) + if (p_findex<0) p_findex=0; else if (p_findex>=points.size()) p_findex=points.size(); @@ -956,7 +956,7 @@ Vector3 Curve3D::interpolate(int p_index, float p_offset) const { Vector3 Curve3D::interpolatef(real_t p_findex) const { - if (p_findex>0) + if (p_findex<0) p_findex=0; else if (p_findex>=points.size()) p_findex=points.size(); |