summaryrefslogtreecommitdiffstats
path: root/core/math/vector3.cpp
diff options
context:
space:
mode:
authorZhehang Ding <zhehangd@gmail.com>2022-08-30 21:28:36 -0700
committerZhehang Ding <zhehangd@gmail.com>2022-08-31 21:20:25 -0700
commit69fe6336f16ec2c889532d36ff7b87fd8a4800f2 (patch)
tree840b991932dae1375974e6dd4015ff42e47a5f16 /core/math/vector3.cpp
parent8fa9d1ae467632daa5f12b278eb616fd580a94ec (diff)
downloadredot-engine-69fe6336f16ec2c889532d36ff7b87fd8a4800f2.tar.gz
Basis constructor: row vectors -> column vectors
Diffstat (limited to 'core/math/vector3.cpp')
-rw-r--r--core/math/vector3.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp
index fdbbb8cb5c..f8eefa4f18 100644
--- a/core/math/vector3.cpp
+++ b/core/math/vector3.cpp
@@ -134,11 +134,11 @@ Vector3 Vector3::octahedron_tangent_decode(const Vector2 &p_oct, float *sign) {
}
Basis Vector3::outer(const Vector3 &p_with) const {
- Vector3 row0(x * p_with.x, x * p_with.y, x * p_with.z);
- Vector3 row1(y * p_with.x, y * p_with.y, y * p_with.z);
- Vector3 row2(z * p_with.x, z * p_with.y, z * p_with.z);
-
- return Basis(row0, row1, row2);
+ Basis basis;
+ basis.rows[0] = Vector3(x * p_with.x, x * p_with.y, x * p_with.z);
+ basis.rows[1] = Vector3(y * p_with.x, y * p_with.y, y * p_with.z);
+ basis.rows[2] = Vector3(z * p_with.x, z * p_with.y, z * p_with.z);
+ return basis;
}
bool Vector3::is_equal_approx(const Vector3 &p_v) const {