API

Function createQuatFromRotationMat4

  • Build a unit quaternion from the rotation part of a column-major 4×4 matrix, matching Babylon.js Quaternion.FromRotationMatrix. The matrix's upper-left 3×3 must be a pure rotation (orthonormal, no scale).

    Parameters

    • matrix: Mat4

      Column-major 4×4 rotation matrix.

    Returns Quat

    A new { x, y, z, w } quaternion.