1#ifndef SCREEN_COORDINATE_H
2#define SCREEN_COORDINATE_H
16 int get_x() const noexcept {
return m_x; }
17 int get_y() const noexcept {
return m_y; }
The coordinate on a screen.
Definition screen_coordinate.h:12
int get_x() const noexcept
Definition screen_coordinate.h:16
int get_y() const noexcept
Definition screen_coordinate.h:17
screen_coordinate operator+(const screen_coordinate &lhs, const screen_coordinate &rhs) noexcept
Definition screen_coordinate.cpp:139
void test_screen_coordinate()
Run the tests for the screen coordinat.
Definition screen_coordinate.cpp:33
bool operator==(const screen_coordinate &lhs, const screen_coordinate &rhs) noexcept
Definition screen_coordinate.cpp:178
bool operator!=(const screen_coordinate &lhs, const screen_coordinate &rhs) noexcept
Definition screen_coordinate.cpp:185
double calc_angle_degrees(const screen_coordinate &from, const screen_coordinate &to)
Calculate the angle in degrees.
Definition screen_coordinate.cpp:13
screen_coordinate operator-(const screen_coordinate &lhs, const screen_coordinate &rhs) noexcept
Definition screen_coordinate.cpp:147
screen_coordinate operator*(const screen_coordinate &lhs, const double &factor) noexcept
Definition screen_coordinate.cpp:155
std::string to_str(const screen_coordinate &c) noexcept
Definition screen_coordinate.cpp:123
std::ostream & operator<<(std::ostream &os, const screen_coordinate &coordinat)
Definition screen_coordinate.cpp:133
screen_coordinate operator/(const screen_coordinate &lhs, const double &factor)
Definition screen_coordinate.cpp:163
double calc_distance(const screen_coordinate &a, const screen_coordinate &b) noexcept
Calculate the Euclidean distance.
Definition screen_coordinate.cpp:27
screen_coordinate & operator+=(screen_coordinate &lhs, const screen_coordinate &rhs) noexcept
Definition screen_coordinate.cpp:172