Files
XCEngine/docs/api/math/matrix3/inverse.md
2026-03-20 02:35:15 +08:00

24 lines
499 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Matrix3::Inverse
```cpp
Matrix3 Inverse() const
```
返回矩阵的逆矩阵。
**返回:** `Matrix3` - 逆矩阵。如果行列式接近零(< EPSILON则返回单位矩阵。
**异常:** 当矩阵奇异(行列式为零)时,返回单位矩阵而非抛出异常。
**复杂度:** O(1)
**示例:**
```cpp
Matrix3 mat = Matrix3::RotationY(0.5f);
Matrix3 inv = mat.Inverse();
// 验证M * M⁻¹ ≈ I
Matrix3 identity = mat * inv;
// identity 应接近单位矩阵
```