MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / direction_to

Method direction_to

core/math/vector4.cpp:120–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120Vector4 Vector4::direction_to(const Vector4 &p_to) const {
121 Vector4 ret(p_to.x - x, p_to.y - y, p_to.z - z, p_to.w - w);
122 ret.normalize();
123 return ret;
124}
125
126Vector4 Vector4::abs() const {
127 return Vector4(Math::abs(x), Math::abs(y), Math::abs(z), Math::abs(w));

Callers

nothing calls this directly

Calls 1

normalizeMethod · 0.45

Tested by

no test coverage detected