docs: update math API docs
This commit is contained in:
39
docs/api/math/vector3/vector3-constructor.md
Normal file
39
docs/api/math/vector3/vector3-constructor.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Vector3::Vector3
|
||||
|
||||
```cpp
|
||||
Vector3() = default;
|
||||
constexpr Vector3(float x, float y, float z);
|
||||
```
|
||||
|
||||
构造一个三维向量。
|
||||
|
||||
**参数:**
|
||||
- `x` - X 分量,默认为 0.0f
|
||||
- `y` - Y 分量,默认为 0.0f
|
||||
- `z` - Z 分量,默认为 0.0f
|
||||
|
||||
**返回:** 无
|
||||
|
||||
**线程安全:** ✅
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include "XCEngine/Math/Vector3.h"
|
||||
|
||||
using namespace XCEngine::Math;
|
||||
|
||||
int main() {
|
||||
Vector3 a;
|
||||
Vector3 b(1.0f, 2.0f, 3.0f);
|
||||
Vector3 c(4.5f, 5.5f, 6.5f);
|
||||
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Vector3 类总览](vector3.md) - 返回类总览
|
||||
Reference in New Issue
Block a user