RIT VEXU Core API
Loading...
Searching...
No Matches
point_t Struct Reference

#include <geometry.h>

Public Member Functions

double dist (const point_t other) const
 
point_t operator+ (const point_t &other) const
 
point_t operator- (const point_t &other) const
 

Public Attributes

double x
 the x position in space
 
double y
 the y position in space
 

Detailed Description

Data structure representing an X,Y coordinate

Member Function Documentation

◆ dist()

double point_t::dist ( const point_t other) const
inline

dist calculates the euclidian distance between this point and another point using the pythagorean theorem

Parameters
otherthe point to measure the distance from
Returns
the euclidian distance between this and other

◆ operator+()

point_t point_t::operator+ ( const point_t & other) const
inline

Vector2D addition operation on points

Parameters
otherthe point to add on to this
Returns
this + other (this.x + other.x, this.y + other.y)

◆ operator-()

point_t point_t::operator- ( const point_t & other) const
inline

Vector2D subtraction operation on points

Parameters
otherthe point_t to subtract from this
Returns
this - other (this.x - other.x, this.y - other.y)

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