Capycore Engine  0.1.0
A simple and lightweight game engine written in C++ based on the Unity API architecture.
Loading...
Searching...
No Matches
Point Class Reference

Represents a point in 2D space. More...

#include <point.h>

Public Member Functions

 Point ()
 
 Point (float x, float y)
 
Point distance_to (const Point &other) const
 Calculates the distance to another point.
 

Public Attributes

float x
 
float y
 

Detailed Description

Represents a point in 2D space.

Constructor & Destructor Documentation

◆ Point() [1/2]

Point::Point ( )

◆ Point() [2/2]

Point::Point ( float  x,
float  y 
)

Member Function Documentation

◆ distance_to()

Point Point::distance_to ( const Point other) const

Calculates the distance to another point.

Parameters
otherThe other point to calculate the distance to.
Returns
The distance as a Point object.

Member Data Documentation

◆ x

float Point::x

◆ y

float Point::y

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