Table of Contents

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

X int
Y int

Properties

One

Unit vector (1, 1).

public static Vec2 One { get; }

Property Value

Vec2

X

public int X { get; init; }

Property Value

int

Y

public int Y { get; init; }

Property Value

int

Zero

Zero vector (0, 0).

public static Vec2 Zero { get; }

Property Value

Vec2

Operators

operator +(Vec2, Vec2)

Add two vectors.

public static Vec2 operator +(Vec2 a, Vec2 b)

Parameters

a Vec2
b Vec2

Returns

Vec2

operator -(Vec2, Vec2)

Subtract two vectors.

public static Vec2 operator -(Vec2 a, Vec2 b)

Parameters

a Vec2
b Vec2

Returns

Vec2