casse-brick
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
point Struct Reference

The point struct represents a point in 2D space. More...

#include <CollidingObject.h>

Public Member Functions

pointoperator+= (const point &other)
 Overloaded compound assignment operator for addition.
 
pointoperator*= (const point &other)
 Overloaded compound assignment operator for element-wise multiplication.
 
const bool operator<= (const float num) const
 Overloaded less than or equal to comparison operator.
 
point operator+ (const point &other)
 Overloaded addition operator.
 
point operator- (const point &other)
 Overloaded subtraction operator.
 
point operator* (float f)
 Overloaded multiplication operator.
 

Data Fields

float x
 The x-coordinate of the point.
 
float y
 The y-coordinate of the point.
 

Detailed Description

The point struct represents a point in 2D space.

This struct provides functionality for representing and manipulating points with floating-point coordinates.

Definition at line 22 of file CollidingObject.h.

Member Function Documentation

◆ operator*()

point point::operator* ( float  f)
inline

Overloaded multiplication operator.

Parameters
fThe scalar value to multiply by.
Returns
A new point representing the result of multiplication.

Definition at line 86 of file CollidingObject.h.

◆ operator*=()

point & point::operator*= ( const point other)
inline

Overloaded compound assignment operator for element-wise multiplication.

Parameters
otherThe point to be multiplied element-wise.
Returns
A reference to the modified point after element-wise multiplication.

Definition at line 44 of file CollidingObject.h.

◆ operator+()

point point::operator+ ( const point other)
inline

Overloaded addition operator.

Parameters
otherThe point to be added.
Returns
A new point representing the result of addition.

Definition at line 66 of file CollidingObject.h.

◆ operator+=()

point & point::operator+= ( const point other)
inline

Overloaded compound assignment operator for addition.

Parameters
otherThe point to be added.
Returns
A reference to the modified point after addition.

Definition at line 32 of file CollidingObject.h.

◆ operator-()

point point::operator- ( const point other)
inline

Overloaded subtraction operator.

Parameters
otherThe point to be subtracted.
Returns
A new point representing the result of subtraction.

Definition at line 76 of file CollidingObject.h.

◆ operator<=()

const bool point::operator<= ( const float  num) const
inline

Overloaded less than or equal to comparison operator.

Parameters
numThe number to compare against.
Returns
True if both x and y coordinates are less than or equal to the specified number, false otherwise.

Definition at line 56 of file CollidingObject.h.

Field Documentation

◆ x

float point::x

The x-coordinate of the point.

Definition at line 23 of file CollidingObject.h.

◆ y

float point::y

The y-coordinate of the point.

Definition at line 24 of file CollidingObject.h.


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