Creepy-simulation
 
Loading...
Searching...
No Matches
Rectangle Struct Reference

Represents a rectangle defined by two points: bottom-left and top-right. More...

#include <utils.hpp>

Public Member Functions

 Rectangle (Point leftDownBound, Point rightUpBound)
 Constructs a Rectangle object.
 
bool operator== (const Rectangle &r2) const
 Equality operator for Rectangle.
 

Public Attributes

Point leftDownBound
 
Point rightUpBound
 

Detailed Description

Represents a rectangle defined by two points: bottom-left and top-right.

Constructor & Destructor Documentation

◆ Rectangle()

Rectangle::Rectangle ( Point  leftDownBound,
Point  rightUpBound 
)
inline

Constructs a Rectangle object.

Parameters
leftDownBoundThe bottom-left corner.
rightUpBoundThe top-right corner.

Member Function Documentation

◆ operator==()

bool Rectangle::operator== ( const Rectangle r2) const
inline

Equality operator for Rectangle.

Parameters
r2Another rectangle to compare with.
Returns
True if the rectangles are equal, false otherwise.

Member Data Documentation

◆ leftDownBound

Point Rectangle::leftDownBound

◆ rightUpBound

Point Rectangle::rightUpBound

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