summaryrefslogtreecommitdiff
path: root/core/variant_op.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/variant_op.cpp')
-rw-r--r--core/variant_op.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index f173c88054..27624b81ee 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -4220,7 +4220,7 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
}
return;
case VECTOR2: {
- r_dst = reinterpret_cast<const Vector2 *>(a._data._mem)->linear_interpolate(*reinterpret_cast<const Vector2 *>(b._data._mem), c);
+ r_dst = reinterpret_cast<const Vector2 *>(a._data._mem)->lerp(*reinterpret_cast<const Vector2 *>(b._data._mem), c);
}
return;
case VECTOR2I: {
@@ -4233,7 +4233,7 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
return;
case RECT2: {
- r_dst = Rect2(reinterpret_cast<const Rect2 *>(a._data._mem)->position.linear_interpolate(reinterpret_cast<const Rect2 *>(b._data._mem)->position, c), reinterpret_cast<const Rect2 *>(a._data._mem)->size.linear_interpolate(reinterpret_cast<const Rect2 *>(b._data._mem)->size, c));
+ r_dst = Rect2(reinterpret_cast<const Rect2 *>(a._data._mem)->position.lerp(reinterpret_cast<const Rect2 *>(b._data._mem)->position, c), reinterpret_cast<const Rect2 *>(a._data._mem)->size.lerp(reinterpret_cast<const Rect2 *>(b._data._mem)->size, c));
}
return;
case RECT2I: {
@@ -4254,7 +4254,7 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
return;
case VECTOR3: {
- r_dst = reinterpret_cast<const Vector3 *>(a._data._mem)->linear_interpolate(*reinterpret_cast<const Vector3 *>(b._data._mem), c);
+ r_dst = reinterpret_cast<const Vector3 *>(a._data._mem)->lerp(*reinterpret_cast<const Vector3 *>(b._data._mem), c);
}
return;
case VECTOR3I: {
@@ -4281,7 +4281,7 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
}
return;
case AABB: {
- r_dst = ::AABB(a._data._aabb->position.linear_interpolate(b._data._aabb->position, c), a._data._aabb->size.linear_interpolate(b._data._aabb->size, c));
+ r_dst = ::AABB(a._data._aabb->position.lerp(b._data._aabb->position, c), a._data._aabb->size.lerp(b._data._aabb->size, c));
}
return;
case BASIS: {
@@ -4293,7 +4293,7 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
}
return;
case COLOR: {
- r_dst = reinterpret_cast<const Color *>(a._data._mem)->linear_interpolate(*reinterpret_cast<const Color *>(b._data._mem), c);
+ r_dst = reinterpret_cast<const Color *>(a._data._mem)->lerp(*reinterpret_cast<const Color *>(b._data._mem), c);
}
return;
case STRING_NAME: {
@@ -4448,7 +4448,7 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
const Vector2 *br = arr_b->ptr();
for (int i = 0; i < sz; i++) {
- vw[i] = ar[i].linear_interpolate(br[i], c);
+ vw[i] = ar[i].lerp(br[i], c);
}
}
r_dst = v;
@@ -4473,7 +4473,7 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
const Vector3 *br = arr_b->ptr();
for (int i = 0; i < sz; i++) {
- vw[i] = ar[i].linear_interpolate(br[i], c);
+ vw[i] = ar[i].lerp(br[i], c);
}
}
r_dst = v;
@@ -4497,7 +4497,7 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
const Color *br = arr_b->ptr();
for (int i = 0; i < sz; i++) {
- vw[i] = ar[i].linear_interpolate(br[i], c);
+ vw[i] = ar[i].lerp(br[i], c);
}
}
r_dst = v;