mirror of
https://github.com/godotengine/godot.git
synced 2024-11-26 06:03:38 +00:00
fixes CurveXD::interpolatef()
fixes Curve2D::interpolatef() and Curve3D::interpolatef() methods
This commit is contained in:
parent
bd03562076
commit
996d93f972
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user