Skip to content

Commit 13511e2

Browse files
authored
Fix runtime error when computing the dot product via utilities.lua (#6527)
1 parent 128f7d7 commit 13511e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

changelog/snippets/other.6438.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- (#5061, #6438) Add metamethods and utility functions for Vectors and Quaternions to simplify and clean up the code involving operations with them.
1+
- (#5061, #6438, #6527) Add metamethods and utility functions for Vectors and Quaternions to simplify and clean up the code involving operations with them.
22
- This **removes** the file `/lua/shared/quaternions.lua`, which was added in #4768 (Mar 4, 2023), so mods that use that file will have to be updated.
33
- The metamethods (defined globally in `/lua/system/utils.lua`) include:
44
- Vector/Vector2 addition/subtraction/negation

lua/utilities.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ end
391391
---@param v2 Vector
392392
---@return number
393393
function DotP(v1, v2)
394-
return v1[1] * v2[1] + v1[2] * v[2] + v[3] * v[3]
394+
return v1[1] * v2[1] + v1[2] * v2[2] + v1[3] * v2[3]
395395
end
396396

397397
--- Returns the conjugate of a quaternion

0 commit comments

Comments
 (0)