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