You've already forked pico-launcher
mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-01-09 16:28:48 -08:00
19 lines
325 B
C++
19 lines
325 B
C++
#pragma once
|
|
|
|
struct Point
|
|
{
|
|
int x;
|
|
int y;
|
|
|
|
constexpr Point()
|
|
: x(0), y(0) { }
|
|
|
|
constexpr Point(int x, int y)
|
|
: x(x), y(y) { }
|
|
|
|
constexpr s64 DistanceSquaredTo(const Point& other) const
|
|
{
|
|
return (s64)(other.x - x) * (other.x - x) + (s64)(other.y - y) * (other.y - y);
|
|
}
|
|
};
|