Table of Contents

Struct Int2

Namespace
Xui.GPU.Shaders.Types
Assembly
Xui.Core.dll

A 2-component vector of 32-bit signed integers.

public struct Int2
Inherited Members

Constructors

Int2(I32)

Initializes a new instance with both components set to the same value.

public Int2(I32 value)

Parameters

value I32

Int2(I32, I32)

Initializes a new instance of the Int2 struct.

public Int2(I32 x, I32 y)

Parameters

x I32
y I32

Fields

X

The X component.

public I32 X

Field Value

I32

Y

The Y component.

public I32 Y

Field Value

I32

Properties

One

Gets the one vector.

public static Int2 One { get; }

Property Value

Int2

Zero

Gets the zero vector.

public static Int2 Zero { get; }

Property Value

Int2

Methods

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator +(Int2, Int2)

Adds two vectors.

public static Int2 operator +(Int2 left, Int2 right)

Parameters

left Int2
right Int2

Returns

Int2

operator /(Int2, I32)

Divides a vector by a scalar.

public static Int2 operator /(Int2 left, I32 right)

Parameters

left Int2
right I32

Returns

Int2

operator /(Int2, Int2)

Divides two vectors component-wise.

public static Int2 operator /(Int2 left, Int2 right)

Parameters

left Int2
right Int2

Returns

Int2

operator *(I32, Int2)

Multiplies a scalar by a vector.

public static Int2 operator *(I32 left, Int2 right)

Parameters

left I32
right Int2

Returns

Int2

operator *(Int2, I32)

Multiplies a vector by a scalar.

public static Int2 operator *(Int2 left, I32 right)

Parameters

left Int2
right I32

Returns

Int2

operator *(Int2, Int2)

Multiplies two vectors component-wise.

public static Int2 operator *(Int2 left, Int2 right)

Parameters

left Int2
right Int2

Returns

Int2

operator -(Int2, Int2)

Subtracts two vectors.

public static Int2 operator -(Int2 left, Int2 right)

Parameters

left Int2
right Int2

Returns

Int2

operator -(Int2)

Negates a vector.

public static Int2 operator -(Int2 value)

Parameters

value Int2

Returns

Int2