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

671 B
Raw Blame History

RectInt::GetRight

int32_t GetRight() const;

获取矩形右边界 x 坐标。

返回: 矩形右边界 x 坐标(等于 x + width

线程安全:

复杂度: O(1)

示例:

#include "XCEngine/Math/Rect.h"
#include <iostream>

using namespace XCEngine::Math;

int main() {
    RectInt rect(10, 20, 100, 50);
    int32_t right = rect.GetRight();
    std::cout << "Right: " << right << "\n";
    return 0;
}

相关文档