diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-29 15:50:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 15:50:00 +0200 |
commit | 58435b0c917fd93d4244ed672e7fadd076dae608 (patch) | |
tree | b41bc67f056615084a111fdad09e25033e2d21a0 /core/math/geometry.cpp | |
parent | 1d45a269f87ff38e04169e6aa85d9ecd73fb3473 (diff) | |
parent | 540156b387270215f513a68b1cf9ffc909ac381b (diff) |
Merge pull request #20371 from aaronfranke/vector-lerp
[Core] [Mono] [GDNative] Rename "linear_interpolate" methods to "lerp"
Diffstat (limited to 'core/math/geometry.cpp')
-rw-r--r-- | core/math/geometry.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp index 3e07e9253e..4733c27cbc 100644 --- a/core/math/geometry.cpp +++ b/core/math/geometry.cpp @@ -911,7 +911,7 @@ Vector<Plane> Geometry::build_sphere_planes(real_t p_radius, int p_lats, int p_l for (int j = 1; j <= p_lats; j++) { // FIXME: This is stupid. - Vector3 angle = normal.linear_interpolate(axis, j / (real_t)p_lats).normalized(); + Vector3 angle = normal.lerp(axis, j / (real_t)p_lats).normalized(); Vector3 pos = angle * p_radius; planes.push_back(Plane(pos, angle)); planes.push_back(Plane(pos * axis_neg, angle * axis_neg)); @@ -943,7 +943,7 @@ Vector<Plane> Geometry::build_capsule_planes(real_t p_radius, real_t p_height, i for (int j = 1; j <= p_lats; j++) { - Vector3 angle = normal.linear_interpolate(axis, j / (real_t)p_lats).normalized(); + Vector3 angle = normal.lerp(axis, j / (real_t)p_lats).normalized(); Vector3 pos = axis * p_height * 0.5 + angle * p_radius; planes.push_back(Plane(pos, angle)); planes.push_back(Plane(pos * axis_neg, angle * axis_neg)); |