mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 17:16:57 +02:00
Initial commit
This commit is contained in:
18
arm9/source/core/math/Point.h
Normal file
18
arm9/source/core/math/Point.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#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);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user