extractScale

fun extractScale(result: Vec3): Vec3

Extracts the scale components from this matrix and stores them in the specified result vector.

The scale is computed as the magnitude of the basis vectors of the upper-left 3×3 portion of the matrix. This assumes the matrix represents an affine transformation composed of rotation and scale without shear.

The returned scale values are always non-negative. Any sign information (e.g., from reflections) is not preserved.

Return

the result vector containing the X, Y, and Z scale components

Parameters

result

the vector that will receive the extracted scale components