Table of Contents

Struct IntVector2

Namespace
Lime
Assembly
Lime.dll

Representation of integer 2D vectors and points.

public struct IntVector2 : IEquatable<IntVector2>
Implements
Inherited Members

Constructors

IntVector2(int)

public IntVector2(int value)

Parameters

value int

IntVector2(int, int)

public IntVector2(int x, int y)

Parameters

x int
y int

Fields

Down

Returns a vector with components 0, 1.

public static readonly IntVector2 Down

Field Value

IntVector2

Left

Returns a vector with components -1, 0.

public static readonly IntVector2 Left

Field Value

IntVector2

One

Returns a vector with components 1, 1.

public static readonly IntVector2 One

Field Value

IntVector2

Right

Returns a vector with components 1, 0.

public static readonly IntVector2 Right

Field Value

IntVector2

Up

Returns a vector with components 0, -1.

public static readonly IntVector2 Up

Field Value

IntVector2

X

[YuzuMember("0")]
public int X

Field Value

int

Y

[YuzuMember("1")]
public int Y

Field Value

int

Zero

Returns a vector with components 0, 0.

public static readonly IntVector2 Zero

Field Value

IntVector2

Properties

this[int]

Gets or sets the vector component by its index.

public int this[int component] { get; set; }

Parameters

component int

Property Value

int

Methods

Clamp(IntVector2, IntVector2, IntVector2)

public static IntVector2 Clamp(IntVector2 value, IntVector2 a, IntVector2 b)

Parameters

value IntVector2
a IntVector2
b IntVector2

Returns

IntVector2

Equals(IntVector2)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(IntVector2 other)

Parameters

other IntVector2

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Max(IntVector2, IntVector2)

public static IntVector2 Max(IntVector2 a, IntVector2 b)

Parameters

a IntVector2
b IntVector2

Returns

IntVector2

Min(IntVector2, IntVector2)

public static IntVector2 Min(IntVector2 a, IntVector2 b)

Parameters

a IntVector2
b IntVector2

Returns

IntVector2

ToString()

Returns the string representation of this IntVector2 in the format: "X, Y".

public override string ToString()

Returns

string

ToVector2()

public Vector2 ToVector2()

Returns

Vector2

Operators

operator +(IntVector2, IntVector2)

public static IntVector2 operator +(IntVector2 lhs, IntVector2 rhs)

Parameters

lhs IntVector2
rhs IntVector2

Returns

IntVector2

operator /(IntVector2, IntVector2)

public static IntVector2 operator /(IntVector2 lhs, IntVector2 rhs)

Parameters

lhs IntVector2
rhs IntVector2

Returns

IntVector2

operator /(IntVector2, int)

public static IntVector2 operator /(IntVector2 lhs, int rhs)

Parameters

lhs IntVector2
rhs int

Returns

IntVector2

operator ==(IntVector2, IntVector2)

public static bool operator ==(IntVector2 lhs, IntVector2 rhs)

Parameters

lhs IntVector2
rhs IntVector2

Returns

bool

explicit operator Size(IntVector2)

public static explicit operator Size(IntVector2 value)

Parameters

value IntVector2

Returns

Size

explicit operator Vector2(IntVector2)

public static explicit operator Vector2(IntVector2 value)

Parameters

value IntVector2

Returns

Vector2

operator !=(IntVector2, IntVector2)

public static bool operator !=(IntVector2 lhs, IntVector2 rhs)

Parameters

lhs IntVector2
rhs IntVector2

Returns

bool

operator *(IntVector2, IntVector2)

public static IntVector2 operator *(IntVector2 lhs, IntVector2 rhs)

Parameters

lhs IntVector2
rhs IntVector2

Returns

IntVector2

operator *(IntVector2, int)

public static IntVector2 operator *(IntVector2 lhs, int rhs)

Parameters

lhs IntVector2
rhs int

Returns

IntVector2

operator *(int, IntVector2)

public static IntVector2 operator *(int lhs, IntVector2 rhs)

Parameters

lhs int
rhs IntVector2

Returns

IntVector2

operator -(IntVector2, IntVector2)

public static IntVector2 operator -(IntVector2 lhs, IntVector2 rhs)

Parameters

lhs IntVector2
rhs IntVector2

Returns

IntVector2

operator -(IntVector2)

public static IntVector2 operator -(IntVector2 value)

Parameters

value IntVector2

Returns

IntVector2