diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-10 16:47:11 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-10 16:47:11 +0200 |
| commit | 94721f5ab8af9e7d91a4de58baf2c8d849ceab6e (patch) | |
| tree | 92fb34d709310b76de1c2d45cfe2aad8db7a523a /core/variant.cpp | |
| parent | 6ab92464bc6356f3342c3efd1fc1bb1a5e4467d5 (diff) | |
| download | redot-engine-94721f5ab8af9e7d91a4de58baf2c8d849ceab6e.tar.gz | |
Revert "Renamed plane's d to distance"
This reverts commit ec7b481170dcd6a7b4cf0e6c1221e204ff7945f3.
This was wrong, `d` is not a distance but the `d` constant in the
parametric equation `ax + by + cz = d` describing the plane.
Diffstat (limited to 'core/variant.cpp')
| -rw-r--r-- | core/variant.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/variant.cpp b/core/variant.cpp index 4a20e569cc..2eacb5d58c 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -3277,7 +3277,7 @@ uint32_t Variant::hash() const { uint32_t hash = hash_djb2_one_float(reinterpret_cast<const Plane *>(_data._mem)->normal.x); hash = hash_djb2_one_float(reinterpret_cast<const Plane *>(_data._mem)->normal.y, hash); hash = hash_djb2_one_float(reinterpret_cast<const Plane *>(_data._mem)->normal.z, hash); - return hash_djb2_one_float(reinterpret_cast<const Plane *>(_data._mem)->distance, hash); + return hash_djb2_one_float(reinterpret_cast<const Plane *>(_data._mem)->d, hash); } break; /* @@ -3625,7 +3625,7 @@ bool Variant::hash_compare(const Variant &p_variant) const { const Plane *r = reinterpret_cast<const Plane *>(p_variant._data._mem); return (hash_compare_vector3(l->normal, r->normal)) && - (hash_compare_scalar(l->distance, r->distance)); + (hash_compare_scalar(l->d, r->d)); } break; case AABB: { |
