Common: Add vector rsize()
This commit is contained in:
parent
93771981a6
commit
0507054675
|
@ -1180,6 +1180,8 @@ public:
|
|||
ALWAYS_INLINE s32 width() const { return right - left; }
|
||||
ALWAYS_INLINE s32 height() const { return bottom - top; }
|
||||
|
||||
ALWAYS_INLINE GSVector2i rsize() const { return zwzw().sub32(xyxy()).xy(); }
|
||||
|
||||
ALWAYS_INLINE bool rempty() const
|
||||
{
|
||||
// !any((x, y) < (z, w)) i.e. !not_empty
|
||||
|
|
|
@ -963,6 +963,7 @@ public:
|
|||
ALWAYS_INLINE s32 width() const { return right - left; }
|
||||
ALWAYS_INLINE s32 height() const { return bottom - top; }
|
||||
|
||||
ALWAYS_INLINE GSVector2i rsize() const { return GSVector2i(width(), height()); }
|
||||
ALWAYS_INLINE bool rempty() const { return (lt32(zwzw()).mask() != 0x00ff); }
|
||||
ALWAYS_INLINE bool rvalid() const { return ((ge32(zwzw()).mask() & 0xff) == 0); }
|
||||
|
||||
|
|
|
@ -1082,6 +1082,7 @@ public:
|
|||
ALWAYS_INLINE s32 width() const { return right - left; }
|
||||
ALWAYS_INLINE s32 height() const { return bottom - top; }
|
||||
|
||||
ALWAYS_INLINE GSVector2i rsize() const { return zwzw().sub32(xyxy()).xy(); }
|
||||
ALWAYS_INLINE bool rempty() const { return (lt32(zwzw()).mask() != 0x00ff); }
|
||||
ALWAYS_INLINE bool rvalid() const { return ((ge32(zwzw()).mask() & 0xff) == 0); }
|
||||
|
||||
|
|
Loading…
Reference in New Issue