Struct Vec2
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
2D integer vector for positions and sizes.
public readonly record struct Vec2 : IEquatable<Vec2>
- Implements
- Inherited Members
Constructors
Vec2(int, int)
2D integer vector for positions and sizes.
public Vec2(int X, int Y)
Parameters
Properties
One
Unit vector (1, 1).
public static Vec2 One { get; }
Property Value
X
public int X { get; init; }
Property Value
Y
public int Y { get; init; }
Property Value
Zero
Zero vector (0, 0).
public static Vec2 Zero { get; }
Property Value
Operators
operator +(Vec2, Vec2)
Add two vectors.
public static Vec2 operator +(Vec2 a, Vec2 b)
Parameters
Returns
operator -(Vec2, Vec2)
Subtract two vectors.
public static Vec2 operator -(Vec2 a, Vec2 b)