Struct int2
Syntax
[Serializable]
public struct int2 : IEquatable<int2>, IFormattable
Constructors
int2(Boolean)
Constructs a int2 vector from a single bool value by converting it to int and assigning it to every component.
Declaration
Parameters
Type |
Name |
Description |
System.Boolean |
v |
|
int2(Double)
Constructs a int2 vector from a single double value by converting it to int and assigning it to every component.
Declaration
Parameters
Type |
Name |
Description |
System.Double |
v |
|
int2(Int32)
Constructs a int2 vector from a single int value by assigning it to every component.
Declaration
Parameters
Type |
Name |
Description |
System.Int32 |
v |
|
int2(Int32, Int32)
Constructs a int2 vector from two int values.
Declaration
public int2(int x, int y)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
int2(Single)
Constructs a int2 vector from a single float value by converting it to int and assigning it to every component.
Declaration
Parameters
Type |
Name |
Description |
System.Single |
v |
|
int2(UInt32)
Constructs a int2 vector from a single uint value by converting it to int and assigning it to every component.
Declaration
Parameters
Type |
Name |
Description |
System.UInt32 |
v |
|
int2(bool2)
Constructs a int2 vector from a bool2 vector by componentwise conversion.
Declaration
Parameters
Type |
Name |
Description |
bool2 |
v |
|
int2(double2)
Constructs a int2 vector from a double2 vector by componentwise conversion.
Declaration
Parameters
int2(float2)
Constructs a int2 vector from a float2 vector by componentwise conversion.
Declaration
Parameters
Type |
Name |
Description |
float2 |
v |
|
int2(int2)
Constructs a int2 vector from an int2 vector.
Declaration
Parameters
Type |
Name |
Description |
int2 |
xy |
|
int2(uint2)
Constructs a int2 vector from a uint2 vector by componentwise conversion.
Declaration
Parameters
Type |
Name |
Description |
uint2 |
v |
|
Fields
x
Declaration
Field Value
Type |
Description |
System.Int32 |
|
y
Declaration
Field Value
Type |
Description |
System.Int32 |
|
zero
Declaration
public static readonly int2 zero
Field Value
Properties
Item[Int32]
Returns the int element at a specified index.
Declaration
public int this[int index] { get; set; }
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Property Value
Type |
Description |
System.Int32 |
|
xx
Declaration
Property Value
xxx
Declaration
Property Value
xxxx
Declaration
public int4 xxxx { get; }
Property Value
xxxy
Declaration
public int4 xxxy { get; }
Property Value
xxy
Declaration
Property Value
xxyx
Declaration
public int4 xxyx { get; }
Property Value
xxyy
Declaration
public int4 xxyy { get; }
Property Value
xy
Declaration
public int2 xy { get; set; }
Property Value
xyx
Declaration
Property Value
xyxx
Declaration
public int4 xyxx { get; }
Property Value
xyxy
Declaration
public int4 xyxy { get; }
Property Value
xyy
Declaration
Property Value
xyyx
Declaration
public int4 xyyx { get; }
Property Value
xyyy
Declaration
public int4 xyyy { get; }
Property Value
yx
Declaration
public int2 yx { get; set; }
Property Value
yxx
Declaration
Property Value
yxxx
Declaration
public int4 yxxx { get; }
Property Value
yxxy
Declaration
public int4 yxxy { get; }
Property Value
yxy
Declaration
Property Value
yxyx
Declaration
public int4 yxyx { get; }
Property Value
yxyy
Declaration
public int4 yxyy { get; }
Property Value
yy
Declaration
Property Value
yyx
Declaration
Property Value
yyxx
Declaration
public int4 yyxx { get; }
Property Value
yyxy
Declaration
public int4 yyxy { get; }
Property Value
yyy
Declaration
Property Value
yyyx
Declaration
public int4 yyyx { get; }
Property Value
yyyy
Declaration
public int4 yyyy { get; }
Property Value
Methods
Equals(Object)
Returns true if the int2 is equal to a given int2, false otherwise.
Declaration
public override bool Equals(object o)
Parameters
Type |
Name |
Description |
System.Object |
o |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.ValueType.Equals(System.Object)
Equals(int2)
Returns true if the int2 is equal to a given int2, false otherwise.
Declaration
public bool Equals(int2 rhs)
Parameters
Type |
Name |
Description |
int2 |
rhs |
|
Returns
Type |
Description |
System.Boolean |
|
GetHashCode()
Returns a hash code for the int2.
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.ValueType.GetHashCode()
ToString()
Returns a string representation of the int2.
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.ValueType.ToString()
Returns a string representation of the int2 using a specified format and culture-specific format information.
Declaration
public string ToString(string format, IFormatProvider formatProvider)
Parameters
Type |
Name |
Description |
System.String |
format |
|
System.IFormatProvider |
formatProvider |
|
Returns
Type |
Description |
System.String |
|
Operators
Addition(Int32, int2)
Returns the result of a componentwise addition operation on an int value and an int2 vector.
Declaration
public static int2 operator +(int lhs, int2 rhs)
Parameters
Type |
Name |
Description |
System.Int32 |
lhs |
|
int2 |
rhs |
|
Returns
Addition(int2, Int32)
Returns the result of a componentwise addition operation on an int2 vector and an int value.
Declaration
public static int2 operator +(int2 lhs, int rhs)
Parameters
Type |
Name |
Description |
int2 |
lhs |
|
System.Int32 |
rhs |
|
Returns
Addition(int2, int2)
Returns the result of a componentwise addition operation on two int2 vectors.
Declaration
public static int2 operator +(int2 lhs, int2 rhs)
Parameters
Returns
BitwiseAnd(Int32, int2)
Returns the result of a componentwise bitwise and operation on an int value and an int2 vector.
Declaration
public static int2 operator &(int lhs, int2 rhs)
Parameters
Type |
Name |
Description |
System.Int32 |
lhs |
|
int2 |
rhs |
|
Returns
BitwiseAnd(int2, Int32)
Returns the result of a componentwise bitwise and operation on an int2 vector and an int value.
Declaration
public static int2 operator &(int2 lhs, int rhs)
Parameters
Type |
Name |
Description |
int2 |
lhs |
|
System.Int32 |
rhs |
|
Returns
BitwiseAnd(int2, int2)
Returns the result of a componentwise bitwise and operation on two int2 vectors.
Declaration
public static int2 operator &(int2 lhs, int2 rhs)
Parameters
Returns
BitwiseOr(Int32, int2)
Returns the result of a componentwise bitwise or operation on an int value and an int2 vector.
Declaration
public static int2 operator |(int lhs, int2 rhs)
Parameters
Type |
Name |
Description |
System.Int32 |
lhs |
|
int2 |
rhs |
|
Returns
BitwiseOr(int2, Int32)
Returns the result of a componentwise bitwise or operation on an int2 vector and an int value.
Declaration
public static int2 operator |(int2 lhs, int rhs)
Parameters
Type |
Name |
Description |
int2 |
lhs |
|
System.Int32 |
rhs |
|
Returns
BitwiseOr(int2, int2)
Returns the result of a componentwise bitwise or operation on two int2 vectors.
Declaration
public static int2 operator |(int2 lhs, int2 rhs)
Parameters
Returns
Decrement(int2)
Returns the result of a componentwise decrement operation on an int2 vector.
Declaration
public static int2 operator --(int2 val)
Parameters
Type |
Name |
Description |
int2 |
val |
|
Returns
Division(Int32, int2)
Returns the result of a componentwise division operation on an int value and an int2 vector.
Declaration
public static int2 operator /(int lhs, int2 rhs)
Parameters
Type |
Name |
Description |
System.Int32 |
lhs |
|
int2 |
rhs |
|
Returns
Division(int2, Int32)
Returns the result of a componentwise division operation on an int2 vector and an int value.
Declaration
public static int2 operator /(int2 lhs, int rhs)
Parameters
Type |
Name |
Description |
int2 |
lhs |
|
System.Int32 |
rhs |
|
Returns
Division(int2, int2)
Returns the result of a componentwise division operation on two int2 vectors.
Declaration
public static int2 operator /(int2 lhs, int2 rhs)
Parameters
Returns
Equality(Int32, int2)
Returns the result of a componentwise equality operation on an int value and an int2 vector.
Declaration
public static bool2 operator ==(int lhs, int2 rhs)
Parameters
Type |
Name |
Description |
System.Int32 |
lhs |
|
int2 |
rhs |
|
Returns
Equality(int2, Int32)
Returns the result of a componentwise equality operation on an int2 vector and an int value.
Declaration
public static bool2 operator ==(int2 lhs, int rhs)
Parameters
Type |
Name |
Description |
int2 |
lhs |
|
System.Int32 |
rhs |
|
Returns
Equality(int2, int2)
Returns the result of a componentwise equality operation on two int2 vectors.
Declaration
public static bool2 operator ==(int2 lhs, int2 rhs)
Parameters
Returns
ExclusiveOr(Int32, int2)
Returns the result of a componentwise bitwise exclusive or operation on an int value and an int2 vector.
Declaration
public static int2 operator ^(int lhs, int2 rhs)
Parameters
Type |
Name |
Description |
System.Int32 |
lhs |
|
int2 |
rhs |
|
Returns
ExclusiveOr(int2, Int32)
Returns the result of a componentwise bitwise exclusive or operation on an int2 vector and an int value.
Declaration
public static int2 operator ^(int2 lhs, int rhs)
Parameters
Type |
Name |
Description |
int2 |
lhs |
|
System.Int32 |
rhs |
|
Returns
ExclusiveOr(int2, int2)
Returns the result of a componentwise bitwise exclusive or operation on two int2 vectors.
Declaration
public static int2 operator ^(int2 lhs, int2 rhs)
Parameters
Returns
Explicit(Boolean to int2)
Explicitly converts a single bool value to a int2 vector by converting it to int and assigning it to every component.
Declaration
public static explicit operator int2(bool v)
Parameters
Type |
Name |
Description |
System.Boolean |
v |
|
Returns
Explicit(Double to int2)
Explicitly converts a single double value to a int2 vector by converting it to int and assigning it to every component.
Declaration
public static explicit operator int2(double v)
Parameters
Type |
Name |
Description |
System.Double |
v |
|
Returns
Explicit(Single to int2)
Explicitly converts a single float value to a int2 vector by converting it to int and assigning it to every component.
Declaration
public static explicit operator int2(float v)
Parameters
Type |
Name |
Description |
System.Single |
v |
|
Returns
Explicit(UInt32 to int2)
Explicitly converts a single uint value to a int2 vector by converting it to int and assigning it to every component.
Declaration
public static explicit operator int2(uint v)
Parameters
Type |
Name |
Description |
System.UInt32 |
v |
|
Returns
Explicit(bool2 to int2)
Explicitly converts a bool2 vector to a int2 vector by componentwise conversion.
Declaration
public static explicit operator int2(bool2 v)
Parameters
Type |
Name |
Description |
bool2 |
v |
|
Returns
Explicit(double2 to int2)
Explicitly converts a double2 vector to a int2 vector by componentwise conversion.
Declaration
public static explicit operator int2(double2 v)
Parameters
Returns
Explicit(float2 to int2)
Explicitly converts a float2 vector to a int2 vector by componentwise conversion.
Declaration
public static explicit operator int2(float2 v)
Parameters
Type |
Name |
Description |
float2 |
v |
|
Returns
Explicit(uint2 to int2)
Explicitly converts a uint2 vector to a int2 vector by componentwise conversion.
Declaration
public static explicit operator int2(uint2 v)
Parameters
Type |
Name |
Description |
uint2 |
v |
|
Returns
GreaterThan(Int32, int2)
Returns the result of a componentwise greater than operation on an int value and an int2 vector.
Declaration
public static bool2 operator>(int lhs, int2 rhs)
Parameters
Type |
Name |
Description |
System.Int32 |
lhs |
|
int2 |
rhs |
|
Returns
GreaterThan(int2, Int32)
Returns the result of a componentwise greater than operation on an int2 vector and an int value.
Declaration
public static bool2 operator>(int2 lhs, int rhs)
Parameters
Type |
Name |
Description |
int2 |
lhs |
|
System.Int32 |
rhs |
|
Returns
GreaterThan(int2, int2)
Returns the result of a componentwise greater than operation on two int2 vectors.
Declaration
public static bool2 operator>(int2 lhs, int2 rhs)
Parameters
Returns
GreaterThanOrEqual(Int32, int2)
Returns the result of a componentwise greater or equal operation on an int value and an int2 vector.
Declaration
public static bool2 operator >=(int lhs, int2 rhs)
Parameters
Type |
Name |
Description |
System.Int32 |
lhs |
|
int2 |
rhs |
|
Returns
GreaterThanOrEqual(int2, Int32)
Returns the result of a componentwise greater or equal operation on an int2 vector and an int value.
Declaration
public static bool2 operator >=(int2 lhs, int rhs)
Parameters
Type |
Name |
Description |
int2 |
lhs |
|
System.Int32 |
rhs |
|
Returns
GreaterThanOrEqual(int2, int2)
Returns the result of a componentwise greater or equal operation on two int2 vectors.
Declaration
public static bool2 operator >=(int2 lhs, int2 rhs)
Parameters
Returns
Implicit(Int32 to int2)
Implicitly converts a single int value to a int2 vector by assigning it to every component.
Declaration
public static implicit operator int2(int v)
Parameters
Type |
Name |
Description |
System.Int32 |
v |
|
Returns
Increment(int2)
Returns the result of a componentwise increment operation on an int2 vector.
Declaration
public static int2 operator ++(int2 val)
Parameters
Type |
Name |
Description |
int2 |
val |
|
Returns
Inequality(Int32, int2)
Returns the result of a componentwise not equal operation on an int value and an int2 vector.
Declaration
public static bool2 operator !=(int lhs, int2 rhs)
Parameters
Type |
Name |
Description |
System.Int32 |
lhs |
|
int2 |
rhs |
|
Returns
Inequality(int2, Int32)
Returns the result of a componentwise not equal operation on an int2 vector and an int value.
Declaration
public static bool2 operator !=(int2 lhs, int rhs)
Parameters
Type |
Name |
Description |
int2 |
lhs |
|
System.Int32 |
rhs |
|
Returns
Inequality(int2, int2)
Returns the result of a componentwise not equal operation on two int2 vectors.
Declaration
public static bool2 operator !=(int2 lhs, int2 rhs)
Parameters
Returns
LeftShift(int2, Int32)
Returns the result of a componentwise left shift operation on an int2 vector by a number of bits specified by a single int.
Declaration
public static int2 operator <<(int2 x, int n)
Parameters
Type |
Name |
Description |
int2 |
x |
|
System.Int32 |
n |
|
Returns
LessThan(Int32, int2)
Returns the result of a componentwise less than operation on an int value and an int2 vector.
Declaration
public static bool2 operator <(int lhs, int2 rhs)
Parameters
Type |
Name |
Description |
System.Int32 |
lhs |
|
int2 |
rhs |
|
Returns
LessThan(int2, Int32)
Returns the result of a componentwise less than operation on an int2 vector and an int value.
Declaration
public static bool2 operator <(int2 lhs, int rhs)
Parameters
Type |
Name |
Description |
int2 |
lhs |
|
System.Int32 |
rhs |
|
Returns
LessThan(int2, int2)
Returns the result of a componentwise less than operation on two int2 vectors.
Declaration
public static bool2 operator <(int2 lhs, int2 rhs)
Parameters
Returns
LessThanOrEqual(Int32, int2)
Returns the result of a componentwise less or equal operation on an int value and an int2 vector.
Declaration
public static bool2 operator <=(int lhs, int2 rhs)
Parameters
Type |
Name |
Description |
System.Int32 |
lhs |
|
int2 |
rhs |
|
Returns
LessThanOrEqual(int2, Int32)
Returns the result of a componentwise less or equal operation on an int2 vector and an int value.
Declaration
public static bool2 operator <=(int2 lhs, int rhs)
Parameters
Type |
Name |
Description |
int2 |
lhs |
|
System.Int32 |
rhs |
|
Returns
LessThanOrEqual(int2, int2)
Returns the result of a componentwise less or equal operation on two int2 vectors.
Declaration
public static bool2 operator <=(int2 lhs, int2 rhs)
Parameters
Returns
Modulus(Int32, int2)
Returns the result of a componentwise modulus operation on an int value and an int2 vector.
Declaration
public static int2 operator %(int lhs, int2 rhs)
Parameters
Type |
Name |
Description |
System.Int32 |
lhs |
|
int2 |
rhs |
|
Returns
Modulus(int2, Int32)
Returns the result of a componentwise modulus operation on an int2 vector and an int value.
Declaration
public static int2 operator %(int2 lhs, int rhs)
Parameters
Type |
Name |
Description |
int2 |
lhs |
|
System.Int32 |
rhs |
|
Returns
Modulus(int2, int2)
Returns the result of a componentwise modulus operation on two int2 vectors.
Declaration
public static int2 operator %(int2 lhs, int2 rhs)
Parameters
Returns
Multiply(Int32, int2)
Returns the result of a componentwise multiplication operation on an int value and an int2 vector.
Declaration
public static int2 operator *(int lhs, int2 rhs)
Parameters
Type |
Name |
Description |
System.Int32 |
lhs |
|
int2 |
rhs |
|
Returns
Multiply(int2, Int32)
Returns the result of a componentwise multiplication operation on an int2 vector and an int value.
Declaration
public static int2 operator *(int2 lhs, int rhs)
Parameters
Type |
Name |
Description |
int2 |
lhs |
|
System.Int32 |
rhs |
|
Returns
Multiply(int2, int2)
Returns the result of a componentwise multiplication operation on two int2 vectors.
Declaration
public static int2 operator *(int2 lhs, int2 rhs)
Parameters
Returns
OnesComplement(int2)
Returns the result of a componentwise bitwise not operation on an int2 vector.
Declaration
public static int2 operator ~(int2 val)
Parameters
Type |
Name |
Description |
int2 |
val |
|
Returns
RightShift(int2, Int32)
Returns the result of a componentwise right shift operation on an int2 vector by a number of bits specified by a single int.
Declaration
public static int2 operator >>(int2 x, int n)
Parameters
Type |
Name |
Description |
int2 |
x |
|
System.Int32 |
n |
|
Returns
Subtraction(Int32, int2)
Returns the result of a componentwise subtraction operation on an int value and an int2 vector.
Declaration
public static int2 operator -(int lhs, int2 rhs)
Parameters
Type |
Name |
Description |
System.Int32 |
lhs |
|
int2 |
rhs |
|
Returns
Subtraction(int2, Int32)
Returns the result of a componentwise subtraction operation on an int2 vector and an int value.
Declaration
public static int2 operator -(int2 lhs, int rhs)
Parameters
Type |
Name |
Description |
int2 |
lhs |
|
System.Int32 |
rhs |
|
Returns
Subtraction(int2, int2)
Returns the result of a componentwise subtraction operation on two int2 vectors.
Declaration
public static int2 operator -(int2 lhs, int2 rhs)
Parameters
Returns
UnaryNegation(int2)
Returns the result of a componentwise unary minus operation on an int2 vector.
Declaration
public static int2 operator -(int2 val)
Parameters
Type |
Name |
Description |
int2 |
val |
|
Returns
UnaryPlus(int2)
Returns the result of a componentwise unary plus operation on an int2 vector.
Declaration
public static int2 operator +(int2 val)
Parameters
Type |
Name |
Description |
int2 |
val |
|
Returns