Files
XCEngine/docs/api/math/matrix4/transpose.md

32 lines
533 B
Markdown
Raw Normal View History

2026-03-20 02:35:15 +08:00
# Matrix4x4::Transpose
```cpp
2026-03-20 02:35:15 +08:00
Matrix4x4 Transpose() const
```
2026-03-20 02:35:15 +08:00
返回矩阵的转置。转置操作将矩阵的行和列互换。
2026-03-20 02:35:15 +08:00
**参数:** (无)
2026-03-20 02:35:15 +08:00
**返回:** 转置后的矩阵
**线程安全:** ✅
**复杂度:** O(n²) - O(16)
**示例:**
```cpp
2026-03-20 02:35:15 +08:00
#include "XCEngine/Math/Matrix4.h"
using namespace XCEngine::Math;
Matrix4 m = Matrix4::Identity();
Matrix4 t = m.Transpose();
// 转置后仍为单位矩阵
```
2026-03-20 02:35:15 +08:00
## 相关文档
- [Matrix4](matrix4.md) - 返回类总览
- [Inverse](inverse.md) - 矩阵求逆