Files
XCEngine/docs/api/math/matrix3/operator-mul-vector3.md

25 lines
432 B
Markdown
Raw Normal View History

2026-03-20 02:35:15 +08:00
# Matrix3::operator* (Vector3)
```cpp
Vector3 operator*(const Vector3& v) const
```
矩阵-向量乘法运算,将矩阵应用于向量。
**参数:**
- `v` - 三维向量
**返回:** `Vector3` - 变换后的向量
**复杂度:** O(1)
**示例:**
```cpp
Matrix3 rotation = Matrix3::RotationZ(Math::Radians(90.0f));
Vector3 v(1.0f, 0.0f, 0.0f);
Vector3 rotated = rotation * v;
// 结果: approximately (0, 1, 0)
```