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
Fields
Down
Returns a vector with components 0, 1.
public static readonly IntVector2 Down
Field Value
Left
Returns a vector with components -1, 0.
public static readonly IntVector2 Left
Field Value
One
Returns a vector with components 1, 1.
public static readonly IntVector2 One
Field Value
Right
Returns a vector with components 1, 0.
public static readonly IntVector2 Right
Field Value
Up
Returns a vector with components 0, -1.
public static readonly IntVector2 Up
Field Value
X
[YuzuMember("0")]
public int X
Field Value
Y
[YuzuMember("1")]
public int Y
Field Value
Zero
Returns a vector with components 0, 0.
public static readonly IntVector2 Zero
Field Value
Properties
this[int]
Gets or sets the vector component by its index.
public int this[int component] { get; set; }
Parameters
component
int
Property Value
Methods
Clamp(IntVector2, IntVector2, IntVector2)
public static IntVector2 Clamp(IntVector2 value, IntVector2 a, IntVector2 b)
Parameters
value
IntVector2a
IntVector2b
IntVector2
Returns
Equals(IntVector2)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(IntVector2 other)
Parameters
other
IntVector2An object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
obj
objectThe 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
IntVector2b
IntVector2
Returns
Min(IntVector2, IntVector2)
public static IntVector2 Min(IntVector2 a, IntVector2 b)
Parameters
a
IntVector2b
IntVector2
Returns
ToString()
Returns the string representation of this IntVector2 in the format: "X, Y".
public override string ToString()
Returns
ToVector2()
public Vector2 ToVector2()
Returns
Operators
operator +(IntVector2, IntVector2)
public static IntVector2 operator +(IntVector2 lhs, IntVector2 rhs)
Parameters
lhs
IntVector2rhs
IntVector2
Returns
operator /(IntVector2, IntVector2)
public static IntVector2 operator /(IntVector2 lhs, IntVector2 rhs)
Parameters
lhs
IntVector2rhs
IntVector2
Returns
operator /(IntVector2, int)
public static IntVector2 operator /(IntVector2 lhs, int rhs)
Parameters
lhs
IntVector2rhs
int
Returns
operator ==(IntVector2, IntVector2)
public static bool operator ==(IntVector2 lhs, IntVector2 rhs)
Parameters
lhs
IntVector2rhs
IntVector2
Returns
explicit operator Size(IntVector2)
public static explicit operator Size(IntVector2 value)
Parameters
value
IntVector2
Returns
explicit operator Vector2(IntVector2)
public static explicit operator Vector2(IntVector2 value)
Parameters
value
IntVector2
Returns
operator !=(IntVector2, IntVector2)
public static bool operator !=(IntVector2 lhs, IntVector2 rhs)
Parameters
lhs
IntVector2rhs
IntVector2
Returns
operator *(IntVector2, IntVector2)
public static IntVector2 operator *(IntVector2 lhs, IntVector2 rhs)
Parameters
lhs
IntVector2rhs
IntVector2
Returns
operator *(IntVector2, int)
public static IntVector2 operator *(IntVector2 lhs, int rhs)
Parameters
lhs
IntVector2rhs
int
Returns
operator *(int, IntVector2)
public static IntVector2 operator *(int lhs, IntVector2 rhs)
Parameters
lhs
intrhs
IntVector2
Returns
operator -(IntVector2, IntVector2)
public static IntVector2 operator -(IntVector2 lhs, IntVector2 rhs)
Parameters
lhs
IntVector2rhs
IntVector2
Returns
operator -(IntVector2)
public static IntVector2 operator -(IntVector2 value)
Parameters
value
IntVector2