Rect t: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
Line 1: Line 1:
{{wrongtitle|title=Rct_t}}
{{wrongtitle|title=Rect_t}}
This helper represents a rectangle with a specified top left point and shift down and right to the bottom right corner.
This helper represents a rectangle with a specified top left point and shift down and right to the bottom right corner.
  struct Rect_t
  struct Rect_t

Revision as of 22:52, 9 May 2006

Template:Wrongtitle This helper represents a rectangle with a specified top left point and shift down and right to the bottom right corner.

struct Rect_t
{
	int x, y;
	int width, height;
};

Example

A rectangle starting at (3, 4) and ending at (5, 6) would be constructed like this:

Rect_t rect = { 3, 4, 5-3, 6-4 };