Struct Vector4i
Represents a 4D vector using four 32-bit integer numbers.
Inherited Members
Namespace: OpenTK.Mathematics
Assembly: OpenTK.Mathematics.dll
Syntax
[Serializable]
public struct Vector4i : IEquatable<Vector4i>, IFormattable
Remarks
The Vector4i structure is suitable for interoperation with unmanaged code requiring four consecutive integers.
Constructors
Vector4i(Vector2i, Vector2i)
Initializes a new instance of the Vector4i struct.
Declaration
public Vector4i(Vector2i v1, Vector2i v2)
Parameters
Type | Name | Description |
---|---|---|
Vector2i | v1 | The Vector2i to get the X and Y components for the Vector4. |
Vector2i | v2 | The Vector2i to get the Z and W components for the Vector4. |
Vector4i(Vector2i)
Initializes a new instance of the Vector4i struct.
Declaration
public Vector4i(Vector2i v)
Parameters
Type | Name | Description |
---|---|---|
Vector2i | v | The Vector2i to copy components from. |
Vector4i(Vector3i, int)
Initializes a new instance of the Vector4i struct.
Declaration
public Vector4i(Vector3i v, int w)
Parameters
Type | Name | Description |
---|---|---|
Vector3i | v | The Vector3i to copy components from. |
int | w | The w component of the new Vector4. |
Vector4i(Vector3i)
Initializes a new instance of the Vector4i struct.
Declaration
public Vector4i(Vector3i v)
Parameters
Type | Name | Description |
---|---|---|
Vector3i | v | The Vector3i to copy components from. |
Vector4i(int, int, int, int)
Initializes a new instance of the Vector4i struct.
Declaration
public Vector4i(int x, int y, int z, int w)
Parameters
Type | Name | Description |
---|---|---|
int | x | The X component of the Vector4i. |
int | y | The Y component of the Vector4i. |
int | z | The Z component of the Vector4i. |
int | w | The W component of the Vector4i. |
Vector4i(int)
Initializes a new instance of the Vector4i struct.
Declaration
public Vector4i(int value)
Parameters
Type | Name | Description |
---|---|---|
int | value | The value that will initialize this instance. |
Fields
One
Defines an instance with all components set to 1.
Declaration
public static readonly Vector4i One
Field Value
Type | Description |
---|---|
Vector4i |
SizeInBytes
Defines the size of the Vector4i struct in bytes.
Declaration
public static readonly int SizeInBytes
Field Value
Type | Description |
---|---|
int |
UnitW
Defines a unit-length Vector4i that points towards the W-axis.
Declaration
public static readonly Vector4i UnitW
Field Value
Type | Description |
---|---|
Vector4i |
UnitX
Defines a unit-length Vector4i that points towards the X-axis.
Declaration
public static readonly Vector4i UnitX
Field Value
Type | Description |
---|---|
Vector4i |
UnitY
Defines a unit-length Vector4i that points towards the Y-axis.
Declaration
public static readonly Vector4i UnitY
Field Value
Type | Description |
---|---|
Vector4i |
UnitZ
Defines a unit-length Vector4i that points towards the Z-axis.
Declaration
public static readonly Vector4i UnitZ
Field Value
Type | Description |
---|---|
Vector4i |
W
The W component of the Vector4i.
Declaration
public int W
Field Value
Type | Description |
---|---|
int |
X
The X component of the Vector4i.
Declaration
public int X
Field Value
Type | Description |
---|---|
int |
Y
The Y component of the Vector4i.
Declaration
public int Y
Field Value
Type | Description |
---|---|
int |
Z
The Z component of the Vector4i.
Declaration
public int Z
Field Value
Type | Description |
---|---|
int |
Zero
Defines an instance with all components set to 0.
Declaration
public static readonly Vector4i Zero
Field Value
Type | Description |
---|---|
Vector4i |
Properties
EuclideanLength
Gets the euclidean length of the vector.
Declaration
public float EuclideanLength { get; }
Property Value
Type | Description |
---|---|
float |
EuclideanLengthSquared
Gets the squared euclidean length of the vector.
Declaration
public int EuclideanLengthSquared { get; }
Property Value
Type | Description |
---|---|
int |
this[int]
Gets or sets the value at the index of the vector.
Declaration
public int this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the component from the vector. |
Property Value
Type | Description |
---|---|
int |
Exceptions
Type | Condition |
---|---|
IndexOutOfRangeException | Thrown if the index is less than 0 or greater than 3. |
ManhattanLength
Gets the manhattan length of the vector.
Declaration
public int ManhattanLength { get; }
Property Value
Type | Description |
---|---|
int |
Wx
Gets or sets a Vector2i with the W and X components of this instance.
Declaration
public Vector2i Wx { get; set; }
Property Value
Type | Description |
---|---|
Vector2i |
Wxy
Gets or sets a Vector3i with the W, X, and Y components of this instance.
Declaration
public Vector3i Wxy { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Wxyz
Gets or sets a Vector4i with the W, X, Y, and Z components of this instance.
Declaration
public Vector4i Wxyz { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Wxz
Gets or sets a Vector3i with the W, X, and Z components of this instance.
Declaration
public Vector3i Wxz { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Wxzy
Gets or sets a Vector4i with the W, X, Z, and Y components of this instance.
Declaration
public Vector4i Wxzy { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Wy
Gets or sets a Vector2i with the W and Y components of this instance.
Declaration
public Vector2i Wy { get; set; }
Property Value
Type | Description |
---|---|
Vector2i |
Wyx
Gets or sets a Vector3i with the W, Y, and X components of this instance.
Declaration
public Vector3i Wyx { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Wyxz
Gets or sets a Vector4i with the W, Y, X, and Z components of this instance.
Declaration
public Vector4i Wyxz { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Wyz
Gets or sets a Vector3i with the W, Y, and Z components of this instance.
Declaration
public Vector3i Wyz { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Wyzx
Gets or sets a Vector4i with the W, Y, Z, and X components of this instance.
Declaration
public Vector4i Wyzx { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Wz
Gets or sets a Vector2i with the W and Z components of this instance.
Declaration
public Vector2i Wz { get; set; }
Property Value
Type | Description |
---|---|
Vector2i |
Wzx
Gets or sets a Vector3i with the W, Z, and X components of this instance.
Declaration
public Vector3i Wzx { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Wzxy
Gets or sets a Vector4i with the W, Z, X, and Y components of this instance.
Declaration
public Vector4i Wzxy { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Wzy
Gets or sets a Vector3i with the W, Z, and Y components of this instance.
Declaration
public Vector3i Wzy { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Wzyw
Gets or sets a Vector4i with the W, Z, Y, and W components of this instance.
Declaration
public Vector4i Wzyw { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Wzyx
Gets or sets a Vector4i with the W, Z, Y, and X components of this instance.
Declaration
public Vector4i Wzyx { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Xw
Gets or sets a Vector2i with the X and W components of this instance.
Declaration
public Vector2i Xw { get; set; }
Property Value
Type | Description |
---|---|
Vector2i |
Xwy
Gets or sets a Vector3i with the X, W, and Y components of this instance.
Declaration
public Vector3i Xwy { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Xwyz
Gets or sets a Vector4i with the X, W, Y, and Z components of this instance.
Declaration
public Vector4i Xwyz { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Xwz
Gets or sets a Vector3i with the X, W, and Z components of this instance.
Declaration
public Vector3i Xwz { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Xwzy
Gets or sets a Vector4i with the X, W, Z, and Y components of this instance.
Declaration
public Vector4i Xwzy { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Xy
Gets or sets a Vector2i with the X and Y components of this instance.
Declaration
public Vector2i Xy { get; set; }
Property Value
Type | Description |
---|---|
Vector2i |
Xyw
Gets or sets a Vector3i with the X, Y, and Z components of this instance.
Declaration
public Vector3i Xyw { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Xywz
Gets or sets a Vector4i with the X, Y, W, and Z components of this instance.
Declaration
public Vector4i Xywz { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Xyz
Gets or sets a Vector3i with the X, Y, and Z components of this instance.
Declaration
public Vector3i Xyz { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Xz
Gets or sets a Vector2i with the X and Z components of this instance.
Declaration
public Vector2i Xz { get; set; }
Property Value
Type | Description |
---|---|
Vector2i |
Xzw
Gets or sets a Vector3i with the X, Z, and W components of this instance.
Declaration
public Vector3i Xzw { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Xzwy
Gets or sets a Vector4i with the X, Z, W, and Y components of this instance.
Declaration
public Vector4i Xzwy { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Xzy
Gets or sets a Vector3i with the X, Z, and Y components of this instance.
Declaration
public Vector3i Xzy { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Xzyw
Gets or sets a Vector4i with the X, Z, Y, and W components of this instance.
Declaration
public Vector4i Xzyw { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Yw
Gets or sets a Vector2i with the Y and W components of this instance.
Declaration
public Vector2i Yw { get; set; }
Property Value
Type | Description |
---|---|
Vector2i |
Ywx
Gets or sets a Vector3i with the Y, W, and X components of this instance.
Declaration
public Vector3i Ywx { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Ywxz
Gets or sets a Vector4i with the Y, W, X, and Z components of this instance.
Declaration
public Vector4i Ywxz { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Ywz
Gets or sets a Vector3i with the Y, W, and Z components of this instance.
Declaration
public Vector3i Ywz { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Ywzx
Gets or sets a Vector4i with the Y, W, Z, and X components of this instance.
Declaration
public Vector4i Ywzx { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Yx
Gets or sets a Vector2i with the Y and X components of this instance.
Declaration
public Vector2i Yx { get; set; }
Property Value
Type | Description |
---|---|
Vector2i |
Yxw
Gets or sets a Vector3i with the Y, X, and W components of this instance.
Declaration
public Vector3i Yxw { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Yxwz
Gets or sets a Vector4i with the Y, X, W, and Z components of this instance.
Declaration
public Vector4i Yxwz { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Yxz
Gets or sets a Vector3i with the Y, X, and Z components of this instance.
Declaration
public Vector3i Yxz { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Yxzw
Gets or sets a Vector4i with the Y, X, Z, and W components of this instance.
Declaration
public Vector4i Yxzw { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Yywz
Gets or sets a Vector4i with the Y, Y, W, and Z components of this instance.
Declaration
public Vector4i Yywz { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Yyzw
Gets or sets a Vector4i with the Y, Y, Z, and W components of this instance.
Declaration
public Vector4i Yyzw { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Yz
Gets or sets a Vector2i with the Y and Z components of this instance.
Declaration
public Vector2i Yz { get; set; }
Property Value
Type | Description |
---|---|
Vector2i |
Yzw
Gets or sets a Vector3i with the Y, Z, and W components of this instance.
Declaration
public Vector3i Yzw { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Yzwx
Gets or sets a Vector4i with the Y, Z, W, and X components of this instance.
Declaration
public Vector4i Yzwx { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Yzx
Gets or sets a Vector3i with the Y, Z, and X components of this instance.
Declaration
public Vector3i Yzx { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Yzxw
Gets or sets a Vector4i with the Y, Z, X, and W components of this instance.
Declaration
public Vector4i Yzxw { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Zw
Gets or sets a Vector2i with the Z and W components of this instance.
Declaration
public Vector2i Zw { get; set; }
Property Value
Type | Description |
---|---|
Vector2i |
Zwx
Gets or sets a Vector3i with the Z, W, and X components of this instance.
Declaration
public Vector3i Zwx { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Zwxy
Gets or sets a Vector4i with the Z, W, X, and Y components of this instance.
Declaration
public Vector4i Zwxy { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Zwy
Gets or sets a Vector3i with the Z, W, and Y components of this instance.
Declaration
public Vector3i Zwy { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Zwyx
Gets or sets a Vector4i with the Z, W, Y, and X components of this instance.
Declaration
public Vector4i Zwyx { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Zwzy
Gets or sets a Vector4i with the Z, W, Z, and Y components of this instance.
Declaration
public Vector4i Zwzy { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Zx
Gets or sets a Vector2i with the Z and X components of this instance.
Declaration
public Vector2i Zx { get; set; }
Property Value
Type | Description |
---|---|
Vector2i |
Zxw
Gets or sets a Vector3i with the Z, X, and W components of this instance.
Declaration
public Vector3i Zxw { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Zxwy
Gets or sets a Vector4i with the Z, X, W, and Y components of this instance.
Declaration
public Vector4i Zxwy { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Zxy
Gets or sets a Vector3i with the Z, X, and Y components of this instance.
Declaration
public Vector3i Zxy { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Zxyw
Gets or sets a Vector4i with the Z, X, Y, and Z components of this instance.
Declaration
public Vector4i Zxyw { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Zy
Gets or sets a Vector2i with the Z and Y components of this instance.
Declaration
public Vector2i Zy { get; set; }
Property Value
Type | Description |
---|---|
Vector2i |
Zyw
Gets or sets a Vector3i with the Z, Y, and W components of this instance.
Declaration
public Vector3i Zyw { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Zywx
Gets or sets a Vector4i with the Z, Y, W, and X components of this instance.
Declaration
public Vector4i Zywx { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Zyx
Gets or sets a Vector3i with the Z, Y, and X components of this instance.
Declaration
public Vector3i Zyx { get; set; }
Property Value
Type | Description |
---|---|
Vector3i |
Zyxw
Gets or sets a Vector4i with the Z, Y, X, and W components of this instance.
Declaration
public Vector4i Zyxw { get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Methods
Add(Vector4i, Vector4i)
Adds two vectors.
Declaration
[Pure]
public static Vector4i Add(Vector4i a, Vector4i b)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | a | Left operand. |
Vector4i | b | Right operand. |
Returns
Type | Description |
---|---|
Vector4i | Result of operation. |
Add(in Vector4i, in Vector4i, out Vector4i)
Adds two vectors.
Declaration
public static void Add(in Vector4i a, in Vector4i b, out Vector4i result)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | a | Left operand. |
Vector4i | b | Right operand. |
Vector4i | result | Result of operation. |
Clamp(Vector4i, Vector4i, Vector4i)
Clamp a vector to the given minimum and maximum vectors.
Declaration
[Pure]
public static Vector4i Clamp(Vector4i vec, Vector4i min, Vector4i max)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vec | Input vector. |
Vector4i | min | Minimum vector. |
Vector4i | max | Maximum vector. |
Returns
Type | Description |
---|---|
Vector4i | The clamped vector. |
Clamp(in Vector4i, in Vector4i, in Vector4i, out Vector4i)
Clamp a vector to the given minimum and maximum vectors.
Declaration
public static void Clamp(in Vector4i vec, in Vector4i min, in Vector4i max, out Vector4i result)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vec | Input vector. |
Vector4i | min | Minimum vector. |
Vector4i | max | Maximum vector. |
Vector4i | result | The clamped vector. |
ComponentMax(Vector4i, Vector4i)
Returns a vector created from the largest of the corresponding components of the given vectors.
Declaration
[Pure]
public static Vector4i ComponentMax(Vector4i a, Vector4i b)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | a | First operand. |
Vector4i | b | Second operand. |
Returns
Type | Description |
---|---|
Vector4i | The component-wise maximum. |
ComponentMax(in Vector4i, in Vector4i, out Vector4i)
Returns a vector created from the largest of the corresponding components of the given vectors.
Declaration
public static void ComponentMax(in Vector4i a, in Vector4i b, out Vector4i result)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | a | First operand. |
Vector4i | b | Second operand. |
Vector4i | result | The component-wise maximum. |
ComponentMin(Vector4i, Vector4i)
Returns a vector created from the smallest of the corresponding components of the given vectors.
Declaration
[Pure]
public static Vector4i ComponentMin(Vector4i a, Vector4i b)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | a | First operand. |
Vector4i | b | Second operand. |
Returns
Type | Description |
---|---|
Vector4i | The component-wise minimum. |
ComponentMin(in Vector4i, in Vector4i, out Vector4i)
Returns a vector created from the smallest of the corresponding components of the given vectors.
Declaration
public static void ComponentMin(in Vector4i a, in Vector4i b, out Vector4i result)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | a | First operand. |
Vector4i | b | Second operand. |
Vector4i | result | The component-wise minimum. |
Deconstruct(out int, out int, out int, out int)
Deconstructs the vector into it's individual components.
Declaration
[Pure]
public void Deconstruct(out int x, out int y, out int z, out int w)
Parameters
Type | Name | Description |
---|---|---|
int | x | The X component of the vector. |
int | y | The Y component of the vector. |
int | z | The Z component of the vector. |
int | w | The W component of the vector. |
Divide(Vector4i, Vector4i)
Divides a vector by the components of a vector using integer division, floor(a/b).
Declaration
[Pure]
public static Vector4i Divide(Vector4i vector, Vector4i scale)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vector | Left operand. |
Vector4i | scale | Right operand. |
Returns
Type | Description |
---|---|
Vector4i | Result of the operation. |
Divide(Vector4i, int)
Divides a vector by a scalar using integer division, floor(a/b).
Declaration
[Pure]
public static Vector4i Divide(Vector4i vector, int scale)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vector | Left operand. |
int | scale | Right operand. |
Returns
Type | Description |
---|---|
Vector4i | Result of the operation. |
Divide(in Vector4i, in Vector4i, out Vector4i)
Divides a vector by the components of a vector using integer division, floor(a/b).
Declaration
public static void Divide(in Vector4i vector, in Vector4i scale, out Vector4i result)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vector | Left operand. |
Vector4i | scale | Right operand. |
Vector4i | result | Result of the operation. |
Divide(in Vector4i, int, out Vector4i)
Divides a vector by a scalar using integer division, floor(a/b).
Declaration
public static void Divide(in Vector4i vector, int scale, out Vector4i result)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vector | Left operand. |
int | scale | Right operand. |
Vector4i | result | Result of the operation. |
Equals(Vector4i)
Declaration
public bool Equals(Vector4i other)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | other |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj |
Returns
Type | Description |
---|---|
bool |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
Multiply(Vector4i, Vector4i)
Multiplies a vector by the components a vector (scale).
Declaration
[Pure]
public static Vector4i Multiply(Vector4i vector, Vector4i scale)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vector | Left operand. |
Vector4i | scale | Right operand. |
Returns
Type | Description |
---|---|
Vector4i | Result of the operation. |
Multiply(Vector4i, int)
Multiplies a vector by an integer scalar.
Declaration
[Pure]
public static Vector4i Multiply(Vector4i vector, int scale)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vector | Left operand. |
int | scale | Right operand. |
Returns
Type | Description |
---|---|
Vector4i | Result of the operation. |
Multiply(in Vector4i, in Vector4i, out Vector4i)
Multiplies a vector by the components of a vector (scale).
Declaration
public static void Multiply(in Vector4i vector, in Vector4i scale, out Vector4i result)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vector | Left operand. |
Vector4i | scale | Right operand. |
Vector4i | result | Result of the operation. |
Multiply(in Vector4i, int, out Vector4i)
Multiplies a vector by an integer scalar.
Declaration
public static void Multiply(in Vector4i vector, int scale, out Vector4i result)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vector | Left operand. |
int | scale | Right operand. |
Vector4i | result | Result of the operation. |
Subtract(Vector4i, Vector4i)
Subtract one Vector from another.
Declaration
[Pure]
public static Vector4i Subtract(Vector4i a, Vector4i b)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | a | First operand. |
Vector4i | b | Second operand. |
Returns
Type | Description |
---|---|
Vector4i | Result of subtraction. |
Subtract(in Vector4i, in Vector4i, out Vector4i)
Subtract one Vector from another.
Declaration
public static void Subtract(in Vector4i a, in Vector4i b, out Vector4i result)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | a | First operand. |
Vector4i | b | Second operand. |
Vector4i | result | Result of subtraction. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
ToString(IFormatProvider)
Declaration
public string ToString(IFormatProvider formatProvider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | formatProvider |
Returns
Type | Description |
---|---|
string |
ToString(string, IFormatProvider)
Declaration
public string ToString(string format, IFormatProvider formatProvider)
Parameters
Type | Name | Description |
---|---|---|
string | format | |
IFormatProvider | formatProvider |
Returns
Type | Description |
---|---|
string |
ToString(string)
Declaration
public string ToString(string format)
Parameters
Type | Name | Description |
---|---|---|
string | format |
Returns
Type | Description |
---|---|
string |
ToVector4()
Declaration
public Vector4 ToVector4()
Returns
Type | Description |
---|---|
Vector4 | The resulting Vector4 instance. |
ToVector4(in Vector4i, out Vector4)
Declaration
public static void ToVector4(in Vector4i input, out Vector4 result)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | input | The given Vector4i to convert. |
Vector4 | result | The resulting Vector4. |
Operators
operator +(Vector4i, Vector4i)
Adds two instances.
Declaration
[Pure]
public static Vector4i operator +(Vector4i left, Vector4i right)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | left | The first instance. |
Vector4i | right | The second instance. |
Returns
Type | Description |
---|---|
Vector4i | The result of the calculation. |
operator /(Vector4i, Vector4i)
Component-wise division between the specified instance by a scale vector.
Declaration
[Pure]
public static Vector4i operator /(Vector4i vec, Vector4i scale)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vec | Left operand. |
Vector4i | scale | Right operand. |
Returns
Type | Description |
---|---|
Vector4i | Result of the division. |
operator /(Vector4i, int)
Divides the instance by a scalar using integer division, floor(a/b).
Declaration
[Pure]
public static Vector4i operator /(Vector4i vec, int scale)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vec | The instance. |
int | scale | The scalar. |
Returns
Type | Description |
---|---|
Vector4i | The result of the calculation. |
operator ==(Vector4i, Vector4i)
Compares two instances for equality.
Declaration
public static bool operator ==(Vector4i left, Vector4i right)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | left | The first instance. |
Vector4i | right | The second instance. |
Returns
Type | Description |
---|---|
bool | True, if left equals right; false otherwise. |
explicit operator Vector4h(Vector4i)
Converts OpenTK.Vector4i to OpenTK.Vector4h.
Declaration
[Pure]
public static explicit operator Vector4h(Vector4i vec)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vec | The Vector4i to convert. |
Returns
Type | Description |
---|---|
Vector4h | The resulting Vector4h. |
explicit operator int*(Vector4i)
Returns a pointer to the first element of the specified instance.
Declaration
[Pure]
public static explicit operator int*(Vector4i v)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | v | The instance. |
Returns
Type | Description |
---|---|
int* | A pointer to the first element of v. |
explicit operator IntPtr(Vector4i)
Returns a pointer to the first element of the specified instance.
Declaration
[Pure]
public static explicit operator IntPtr(Vector4i v)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | v | The instance. |
Returns
Type | Description |
---|---|
IntPtr | A pointer to the first element of v. |
implicit operator Vector4(Vector4i)
Converts OpenTK.Vector4i to OpenTK.Vector4.
Declaration
[Pure]
public static implicit operator Vector4(Vector4i vec)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vec | The Vector4i to convert. |
Returns
Type | Description |
---|---|
Vector4 | The resulting Vector4. |
implicit operator Vector4d(Vector4i)
Converts OpenTK.Vector4i to OpenTK.Vector4d.
Declaration
[Pure]
public static implicit operator Vector4d(Vector4i vec)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vec | The Vector4i to convert. |
Returns
Type | Description |
---|---|
Vector4d | The resulting Vector4d. |
implicit operator Vector4i((int X, int Y, int Z, int W))
Initializes a new instance of the Vector4i struct using a tuple containing the component values.
Declaration
[Pure]
public static implicit operator Vector4i((int X, int Y, int Z, int W) values)
Parameters
Type | Name | Description |
---|---|---|
(int X, int Y, int Z, int W) | values | A tuple containing the component values. |
Returns
Type | Description |
---|---|
Vector4i | A new instance of the Vector4i struct with the given component values. |
operator !=(Vector4i, Vector4i)
Compares two instances for inequality.
Declaration
public static bool operator !=(Vector4i left, Vector4i right)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | left | The first instance. |
Vector4i | right | The second instance. |
Returns
Type | Description |
---|---|
bool | True, if left does not equa lright; false otherwise. |
operator *(Vector4i, Vector4i)
Component-wise multiplication between the specified instance by a scale vector.
Declaration
[Pure]
public static Vector4i operator *(Vector4i vec, Vector4i scale)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vec | Right operand. |
Vector4i | scale | Left operand. |
Returns
Type | Description |
---|---|
Vector4i | Result of multiplication. |
operator *(Vector4i, int)
Multiplies an instance by an integer scalar.
Declaration
[Pure]
public static Vector4i operator *(Vector4i vec, int scale)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vec | The instance. |
int | scale | The scalar. |
Returns
Type | Description |
---|---|
Vector4i | The result of the calculation. |
operator *(int, Vector4i)
Multiplies an instance by an integer scalar.
Declaration
[Pure]
public static Vector4i operator *(int scale, Vector4i vec)
Parameters
Type | Name | Description |
---|---|---|
int | scale | The scalar. |
Vector4i | vec | The instance. |
Returns
Type | Description |
---|---|
Vector4i | The result of the calculation. |
operator -(Vector4i, Vector4i)
Subtracts two instances.
Declaration
[Pure]
public static Vector4i operator -(Vector4i left, Vector4i right)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | left | The first instance. |
Vector4i | right | The second instance. |
Returns
Type | Description |
---|---|
Vector4i | The result of the calculation. |
operator -(Vector4i)
Negates an instance.
Declaration
[Pure]
public static Vector4i operator -(Vector4i vec)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vec | The instance. |
Returns
Type | Description |
---|---|
Vector4i | The result of the calculation. |