2 public struct Point2 : IEquatable<Point2> {
25 public static implicit
operator Point2((
int X,
int Y) v) =>
new(v.X, v.Y);
33 public override string ToString() => $
"{X},{Y}";
76 fixed (
int* ptr = &
X) {
77 return new Span<int>(ptr, 2);
82 fixed (
int* ptr = &
X) {
91 public static Point2 Round(
float x,
float y) =>
new((int)MathF.Round(x), (
int)MathF.Round(y));
95 public static Point2 Ceiling(
float x,
float y) =>
new((int)MathF.Ceiling(x), (
int)MathF.Ceiling(y));
99 public static Point2 Floor(
float x,
float y) =>
new((int)MathF.Floor(x), (
int)MathF.Floor(y));
static int Min(int x1, int x2)
static int Max(int x1, int x2)
static Point2 operator*(int n, Point2 p)
static Point2 Min(Point2 p1, Point2 p2)
static Point2 Max(Point2 p, int v)
static readonly Point2 Zero
static Point2 Max(Point2 p1, Point2 p2)
override int GetHashCode()
static int Cross(Point2 p1, Point2 p2)
static int Dot(Point2 p1, Point2 p2)
static Point2 operator/(Point2 p, int n)
unsafe Span< int > AsSpan()
static Point2 Round(Vector2 v)
static Point2 Floor(Vector2 v)
static bool operator==(Point2 p1, Point2 p2)
override bool Equals(object obj)
static bool operator!=(Point2 p1, Point2 p2)
static Point2 operator+(Point2 p)
static readonly Point2 One
static Point2 Ceiling(Vector2 v)
bool Equals(Point2 other)
static Point2 Ceiling(float x, float y)
override string ToString()
static Point2 Floor(float x, float y)
static Point2 Round(float x, float y)
static readonly Point2 UnitX
static Point2 Min(Point2 p, int v)
static int MinElement(Point2 p)
static Point2 Perpendicular(Point2 p)
static Point2 operator-(Point2 p)
static int MaxElement(Point2 p)
static readonly Point2 UnitY