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, int, int)
Initializes a new instance of the Vector4i struct.
Declaration
public Vector4i(Vector2i xy, int z = 0, int w = 0)
Parameters
Type | Name | Description |
---|---|---|
Vector2i | xy | The x and y components of the Vector4i. |
int | z | The z component of the Vector4i. |
int | w | The w component of the Vector4i. |
Vector4i(Vector3i, int)
Initializes a new instance of the Vector4i struct.
Declaration
public Vector4i(Vector3i xyz, int w = 0)
Parameters
Type | Name | Description |
---|---|---|
Vector3i | xyz | The x, y and z components 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. |
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. |
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 readonly float EuclideanLength { get; }
Property Value
Type | Description |
---|---|
float |
EuclideanLengthSquared
Gets the squared euclidean length of the vector.
Declaration
public readonly 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] { readonly 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 readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly 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 { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4i |
Methods
Abs()
Returns a new vector that is the component-wise absolute value of the vector.
Declaration
public readonly Vector4i Abs()
Returns
Type | Description |
---|---|
Vector4i | The component-wise absolute value vector. |
Abs(Vector4i)
Take the component-wise absolute value of a vector.
Declaration
public static Vector4i Abs(Vector4i vec)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vec | The vector to apply component-wise absolute value to. |
Returns
Type | Description |
---|---|
Vector4i | The component-wise absolute value vector. |
Abs(in Vector4i, out Vector4i)
Take the component-wise absolute value of a vector.
Declaration
public static void Abs(in Vector4i vec, out Vector4i result)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | vec | The vector to apply component-wise absolute value to. |
Vector4i | result | The component-wise absolute value vector. |
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 readonly 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)
Indicates whether the current object is equal to another object of the same type.
Declaration
public readonly bool Equals(Vector4i other)
Parameters
Type | Name | Description |
---|---|---|
Vector4i | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(object)
Indicates whether this instance and a specified object are equal.
Declaration
public override readonly bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
bool | true if |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
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()
Returns the fully qualified type name of this instance.
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
string | The fully qualified type name. |
Overrides
ToString(IFormatProvider)
Formats the value of the current instance using the specified format.
Declaration
public readonly string ToString(IFormatProvider formatProvider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | formatProvider | The provider to use to format the value. -or- A null reference ( |
Returns
Type | Description |
---|---|
string | The value of the current instance in the specified format. |
ToString(string)
Formats the value of the current instance using the specified format.
Declaration
public readonly string ToString(string format)
Parameters
Type | Name | Description |
---|---|---|
string | format | The format to use. -or- A null reference ( |
Returns
Type | Description |
---|---|
string | The value of the current instance in the specified format. |
ToString(string, IFormatProvider)
Formats the value of the current instance using the specified format.
Declaration
public readonly string ToString(string format, IFormatProvider formatProvider)
Parameters
Type | Name | Description |
---|---|---|
string | format | The format to use. -or- A null reference ( |
IFormatProvider | formatProvider | The provider to use to format the value. -or- A null reference ( |
Returns
Type | Description |
---|---|
string | The value of the current instance in the specified format. |
ToVector4()
Declaration
public readonly 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. |
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. |