Skip to content

Commit

Permalink
Fix quaternion norm method. Fixes: #1532
Browse files Browse the repository at this point in the history
  • Loading branch information
thegrb93 committed Oct 8, 2023
1 parent 9543101 commit aa125e8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lua/starfall/libs_sh/quaternion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,15 @@ end

-------------------------------------

--- Returns absolute value of the quaternion
-- @return Vector Absolute value
function quat_methods:getAbsolute()
--- Returns norm of the quaternion
-- @return number norm value
function quat_methods:getNorm()
return getQuatLen(self)
end

--- Returns squared norm of the quaternion
-- @return number squared norm/absolute value
function quat_methods:getNormSqr()
return getQuatLenSqr(self)
end

Expand Down

0 comments on commit aa125e8

Please sign in to comment.