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_op.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_op.cpp')
-rw-r--r-- | core/variant_op.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/variant_op.cpp b/core/variant_op.cpp index c37ec61d58..4c9848f26a 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -1588,7 +1588,7 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool v->normal.z = p_value._data._int; valid = true; } else if (p_index == CoreStringNames::singleton->d) { - v->distance = p_value._data._int; + v->d = p_value._data._int; valid = true; } } else if (p_value.type == Variant::FLOAT) { @@ -1603,7 +1603,7 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool v->normal.z = p_value._data._float; valid = true; } else if (p_index == CoreStringNames::singleton->d) { - v->distance = p_value._data._float; + v->d = p_value._data._float; valid = true; } @@ -1889,7 +1889,7 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const { } else if (p_index == CoreStringNames::singleton->z) { return v->normal.z; } else if (p_index == CoreStringNames::singleton->d) { - return v->distance; + return v->d; } else if (p_index == CoreStringNames::singleton->normal) { return v->normal; } @@ -2373,7 +2373,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) return; } else if (*str == "d") { valid = true; - v->distance = p_value; + v->d = p_value; return; } } @@ -2880,7 +2880,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const { return v->normal; } else if (*str == "d") { valid = true; - return v->distance; + return v->d; } } |