跳到主要内容

KQuaternion.lengthSq() method

求取各元素的平方和。

Computes the Euclidean length (straight-line length) of this quaternion, considered as a 4 dimensional vector. This can be useful if you are comparing the lengths of two quaternions, as this is a slightly more efficient calculation than length().

Signature:

lengthSq(): number;

Returns:

number

返回各元素的平方和。

Return square length.