docs: update math API docs
This commit is contained in:
@@ -1,20 +1,34 @@
|
||||
# Quaternion::Dot
|
||||
|
||||
```cpp
|
||||
float Dot(const Quaternion& other) const
|
||||
float Dot(const Quaternion& other) const;
|
||||
```
|
||||
|
||||
计算两个四元数的点积。
|
||||
计算两个四元数的点积(各分量相乘后求和)。
|
||||
|
||||
**参数:**
|
||||
- `other` - 另一个四元数
|
||||
|
||||
**返回:** `float` - 点积结果
|
||||
**返回:** 点积结果
|
||||
|
||||
**线程安全:** ✅
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
float dot = quat1.Dot(quat2);
|
||||
#include <XCEngine/Math/Quaternion.h>
|
||||
|
||||
using namespace XCEngine::Math;
|
||||
|
||||
Quaternion q1 = Quaternion::Identity();
|
||||
Quaternion q2 = Quaternion::FromAxisAngle(Vector3::Up(), Math::Radians(90.0f));
|
||||
|
||||
float dot = q1.Dot(q2);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Quaternion](quaternion.md) - 返回类总览
|
||||
- [Magnitude](magnitude.md) - 求模长
|
||||
|
||||
Reference in New Issue
Block a user