目次 - SDL 3.0 API(機能別) - 領域 - SDL_GetRectIntersectionFloat

SDL_GetRectIntersectionFloat

浮動小数点で表された2つの長方形の辺の交点を求める

ヘッダ

SDL3/SDL_rect.h

構文

bool SDL_GetRectIntersectionFloat(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result);

引数

const SDL_FRect *A1つ目の長方形
const SDL_FRect *B2つ目の長方形
SDL_FRect *resultABの辺の交点の書き込み先へのポインタ

戻り値

(bool) 辺が交わるとき真, 交わらないとき偽を戻す.

詳細

resultがNULLのとき, この関数は偽を戻す.

スレッドセーフ

この関数はどのスレッドからも安全に呼べる.

バージョン

SDL 3.2.0以降

SDL Wikiへのリンク

SDL_GetRectIntersectionFloat - SDL Wiki