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

36 lines
672 B
Markdown

# RectInt::GetLeft
```cpp
int32_t GetLeft() const;
```
获取矩形左边界 x 坐标。
**返回:** 矩形左边界 x 坐标(等于 x 成员变量)
**线程安全:**
**复杂度:** O(1)
**示例:**
```cpp
#include "XCEngine/Math/Rect.h"
#include <iostream>
using namespace XCEngine::Math;
int main() {
RectInt rect(10, 20, 100, 50);
int32_t left = rect.GetLeft();
std::cout << "Left: " << left << "\n";
return 0;
}
```
## 相关文档
- [`RectInt::GetRight`](getright.md) - 获取右边界
- [`RectInt::GetTop`](gettop.md) - 获取上边界
- [`RectInt::GetBottom`](getbottom.md) - 获取下边界
- [RectInt 总览](rectint.md)