BEEP-8 Helper Lib 1.0.0
Loading...
Searching...
No Matches
Rect Struct Reference

A structure for representing rectangles with fixed-point coordinates. More...

#include <submath.h>

Public Member Functions

void SetXYWH (fx8 x_, fx8 y_, fx8 w_, fx8 h_)
 Set the coordinates and dimensions of the rectangle.
 
fx8 MiddlePointX ()
 Calculate the middle point x-coordinate of the rectangle.
 
 Rect (fx8 x_, fx8 y_, fx8 w_, fx8 h_)
 

Public Attributes

fx8 x
 
fx8 y
 
fx8 w
 
fx8 h
 

Detailed Description

A structure for representing rectangles with fixed-point coordinates.

Member Function Documentation

◆ MiddlePointX()

fx8 Rect::MiddlePointX ( )
inline

Calculate the middle point x-coordinate of the rectangle.

Returns
The middle point x-coordinate.

◆ SetXYWH()

void Rect::SetXYWH ( fx8 x_,
fx8 y_,
fx8 w_,
fx8 h_ )
inline

Set the coordinates and dimensions of the rectangle.

Parameters
xx_The x-coordinate of the rectangle.
yy_The y-coordinate of the rectangle.
ww_The width of the rectangle.
hh_The height of the rectangle.

The documentation for this struct was generated from the following file: