Show / Hide Table of Contents

Struct Vector3i

Represents a 3D vector using three 32-bit integer numbers.

Implements
IEquatable<Vector3i>
IFormattable
IAdditionOperators<Vector3i, Vector3i, Vector3i>
ISubtractionOperators<Vector3i, Vector3i, Vector3i>
IUnaryNegationOperators<Vector3i, Vector3i>
IUnaryPlusOperators<Vector3i, Vector3i>
IMultiplyOperators<Vector3i, int, Vector3i>
IMultiplyOperators<Vector3i, Vector3i, Vector3i>
IDivisionOperators<Vector3i, int, Vector3i>
IDivisionOperators<Vector3i, Vector3i, Vector3i>
IEqualityOperators<Vector3i, Vector3i, bool>
IAdditiveIdentity<Vector3i, Vector3i>
IMultiplicativeIdentity<Vector3i, Vector3i>
IMinMaxValue<Vector3i>
Inherited Members
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: OpenTK.Mathematics
Assembly: OpenTK.Mathematics.dll
Syntax
[Serializable]
public struct Vector3i : IEquatable<Vector3i>, IFormattable, IAdditionOperators<Vector3i, Vector3i, Vector3i>, ISubtractionOperators<Vector3i, Vector3i, Vector3i>, IUnaryNegationOperators<Vector3i, Vector3i>, IUnaryPlusOperators<Vector3i, Vector3i>, IMultiplyOperators<Vector3i, int, Vector3i>, IMultiplyOperators<Vector3i, Vector3i, Vector3i>, IDivisionOperators<Vector3i, int, Vector3i>, IDivisionOperators<Vector3i, Vector3i, Vector3i>, IEqualityOperators<Vector3i, Vector3i, bool>, IAdditiveIdentity<Vector3i, Vector3i>, IMultiplicativeIdentity<Vector3i, Vector3i>, IMinMaxValue<Vector3i>
Remarks

The Vector3i structure is suitable for interoperation with unmanaged code requiring three consecutive integers.

Constructors

Vector3i(Vector2i, int)

Initializes a new instance of the Vector3i struct.

Declaration
public Vector3i(Vector2i xy, int z = 0)
Parameters
Type Name Description
Vector2i xy

The x and y components of the Vector3i.

int z

The z component of the Vector3i.

Vector3i(int)

Initializes a new instance of the Vector3i struct.

Declaration
public Vector3i(int value)
Parameters
Type Name Description
int value

The value that will initialize this instance.

Vector3i(int, int, int)

Initializes a new instance of the Vector3i struct.

Declaration
public Vector3i(int x, int y, int z)
Parameters
Type Name Description
int x

The x component of the Vector3i.

int y

The y component of the Vector3i.

int z

The z component of the Vector3i.

Fields

One

Defines an instance with all components set to 1.

Declaration
public static readonly Vector3i One
Field Value
Type Description
Vector3i

SizeInBytes

Defines the size of the Vector3i struct in bytes.

Declaration
public static readonly int SizeInBytes
Field Value
Type Description
int

UnitX

Defines a unit-length Vector3i that points towards the X-axis.

Declaration
public static readonly Vector3i UnitX
Field Value
Type Description
Vector3i

UnitY

Defines a unit-length Vector3i that points towards the Y-axis.

Declaration
public static readonly Vector3i UnitY
Field Value
Type Description
Vector3i

UnitZ

Defines a unit-length Vector3i that points towards the Z-axis.

Declaration
public static readonly Vector3i UnitZ
Field Value
Type Description
Vector3i

X

The X component of the Vector3i.

Declaration
public int X
Field Value
Type Description
int

Y

The Y component of the Vector3i.

Declaration
public int Y
Field Value
Type Description
int

Z

The Z component of the Vector3i.

Declaration
public int Z
Field Value
Type Description
int

Zero

Defines an instance with all components set to 0.

Declaration
public static readonly Vector3i Zero
Field Value
Type Description
Vector3i

Properties

AdditiveIdentity

Gets the additive identity of Vector3i. Equivalent to Vector3i.Zero.

Declaration
public static Vector3i AdditiveIdentity { get; }
Property Value
Type Description
Vector3i

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 2.

ManhattanLength

Gets the manhattan length of the vector.

Declaration
public readonly int ManhattanLength { get; }
Property Value
Type Description
int

MaxValue

Gets the maximum value for Vector3i. Sets X, Y, and Z components to the largest value for a signed 32-bit integer.

Declaration
public static Vector3i MaxValue { get; }
Property Value
Type Description
Vector3i

MinValue

Gets the minimum value for Vector3i. Sets X, Y, and Z components to the smallest value for a signed 32-bit integer.

Declaration
public static Vector3i MinValue { get; }
Property Value
Type Description
Vector3i

MultiplicativeIdentity

Gets the multiplicative identity of Vector3i. Equivalent to Vector3i.One.

Declaration
public static Vector3i MultiplicativeIdentity { get; }
Property Value
Type Description
Vector3i

Xy

Gets or sets a Vector2i with the X and Y components of this instance.

Declaration
public Vector2i Xy { readonly get; set; }
Property Value
Type Description
Vector2i

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

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

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

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

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

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

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

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

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

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

Methods

Abs()

Returns a new vector that is the component-wise absolute value of the vector.

Declaration
public readonly Vector3i Abs()
Returns
Type Description
Vector3i

The component-wise absolute value vector.

Abs(Vector3i)

Take the component-wise absolute value of a vector.

Declaration
public static Vector3i Abs(Vector3i vec)
Parameters
Type Name Description
Vector3i vec

The vector to apply component-wise absolute value to.

Returns
Type Description
Vector3i

The component-wise absolute value vector.

Abs(in Vector3i, out Vector3i)

Take the component-wise absolute value of a vector.

Declaration
public static void Abs(in Vector3i vec, out Vector3i result)
Parameters
Type Name Description
Vector3i vec

The vector to apply component-wise absolute value to.

Vector3i result

The component-wise absolute value vector.

Add(Vector3i, Vector3i)

Adds two vectors.

Declaration
[Pure]
public static Vector3i Add(Vector3i a, Vector3i b)
Parameters
Type Name Description
Vector3i a

Left operand.

Vector3i b

Right operand.

Returns
Type Description
Vector3i

Result of operation.

Add(in Vector3i, in Vector3i, out Vector3i)

Adds two vectors.

Declaration
public static void Add(in Vector3i a, in Vector3i b, out Vector3i result)
Parameters
Type Name Description
Vector3i a

Left operand.

Vector3i b

Right operand.

Vector3i result

Result of operation.

Clamp(Vector3i, Vector3i, Vector3i)

Clamp a vector to the given minimum and maximum vectors.

Declaration
[Pure]
public static Vector3i Clamp(Vector3i vec, Vector3i min, Vector3i max)
Parameters
Type Name Description
Vector3i vec

Input vector.

Vector3i min

Minimum vector.

Vector3i max

Maximum vector.

Returns
Type Description
Vector3i

The clamped vector.

Clamp(in Vector3i, in Vector3i, in Vector3i, out Vector3i)

Clamp a vector to the given minimum and maximum vectors.

Declaration
public static void Clamp(in Vector3i vec, in Vector3i min, in Vector3i max, out Vector3i result)
Parameters
Type Name Description
Vector3i vec

Input vector.

Vector3i min

Minimum vector.

Vector3i max

Maximum vector.

Vector3i result

The clamped vector.

ComponentEqual(in Vector3i, in Vector3i)

Component wise equal comparision of two vectors.

Declaration
public static Vector3b ComponentEqual(in Vector3i left, in Vector3i right)
Parameters
Type Name Description
Vector3i left

The left vector.

Vector3i right

The right vector.

Returns
Type Description
Vector3b

A component wise boolean vector whose compoennts are true when the corresponding left component is equal to the right component.

ComponentMax(Vector3i, Vector3i)

Returns a vector created from the largest of the corresponding components of the given vectors.

Declaration
[Pure]
public static Vector3i ComponentMax(Vector3i a, Vector3i b)
Parameters
Type Name Description
Vector3i a

First operand.

Vector3i b

Second operand.

Returns
Type Description
Vector3i

The component-wise maximum.

ComponentMax(in Vector3i, in Vector3i, out Vector3i)

Returns a vector created from the largest of the corresponding components of the given vectors.

Declaration
public static void ComponentMax(in Vector3i a, in Vector3i b, out Vector3i result)
Parameters
Type Name Description
Vector3i a

First operand.

Vector3i b

Second operand.

Vector3i result

The component-wise maximum.

ComponentMin(Vector3i, Vector3i)

Returns a vector created from the smallest of the corresponding components of the given vectors.

Declaration
[Pure]
public static Vector3i ComponentMin(Vector3i a, Vector3i b)
Parameters
Type Name Description
Vector3i a

First operand.

Vector3i b

Second operand.

Returns
Type Description
Vector3i

The component-wise minimum.

ComponentMin(in Vector3i, in Vector3i, out Vector3i)

Returns a vector created from the smallest of the corresponding components of the given vectors.

Declaration
public static void ComponentMin(in Vector3i a, in Vector3i b, out Vector3i result)
Parameters
Type Name Description
Vector3i a

First operand.

Vector3i b

Second operand.

Vector3i result

The component-wise minimum.

ComponentNotEqual(in Vector3i, in Vector3i)

Component wise not equal comparision of two vectors.

Declaration
public static Vector3b ComponentNotEqual(in Vector3i left, in Vector3i right)
Parameters
Type Name Description
Vector3i left

The left vector.

Vector3i right

The right vector.

Returns
Type Description
Vector3b

A component wise boolean vector whose compoennts are true when the corresponding left component is not equal to the right component.

Deconstruct(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)
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.

Divide(Vector3i, Vector3i)

Divides a vector by the components of a vector using integer division, floor(a/b).

Declaration
[Pure]
public static Vector3i Divide(Vector3i vector, Vector3i scale)
Parameters
Type Name Description
Vector3i vector

Left operand.

Vector3i scale

Right operand.

Returns
Type Description
Vector3i

Result of the operation.

Divide(Vector3i, int)

Divides a vector by a scalar using integer division, floor(a/b).

Declaration
[Pure]
public static Vector3i Divide(Vector3i vector, int scale)
Parameters
Type Name Description
Vector3i vector

Left operand.

int scale

Right operand.

Returns
Type Description
Vector3i

Result of the operation.

Divide(in Vector3i, in Vector3i, out Vector3i)

Divides a vector by the components of a vector using integer division, floor(a/b).

Declaration
public static void Divide(in Vector3i vector, in Vector3i scale, out Vector3i result)
Parameters
Type Name Description
Vector3i vector

Left operand.

Vector3i scale

Right operand.

Vector3i result

Result of the operation.

Divide(in Vector3i, int, out Vector3i)

Divides a vector by a scalar using integer division, floor(a/b).

Declaration
public static void Divide(in Vector3i vector, int scale, out Vector3i result)
Parameters
Type Name Description
Vector3i vector

Left operand.

int scale

Right operand.

Vector3i result

Result of the operation.

Equals(Vector3i)

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

Declaration
public readonly bool Equals(Vector3i other)
Parameters
Type Name Description
Vector3i other

An object to compare with this object.

Returns
Type Description
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.

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 obj and this instance are the same type and represent the same value; otherwise, false.

Overrides
ValueType.Equals(object)

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
ValueType.GetHashCode()

GreaterThan(in Vector3i, in Vector3i)

Component wise greater than comparision of two vectors.

Declaration
public static Vector3b GreaterThan(in Vector3i left, in Vector3i right)
Parameters
Type Name Description
Vector3i left

The left vector.

Vector3i right

The right vector.

Returns
Type Description
Vector3b

A component wise boolean vector whose compoennts are true when the corresponding left component is greater than the right component.

GreaterThanOrEqual(in Vector3i, in Vector3i)

Component wise greater than or equal comparision of two vectors.

Declaration
public static Vector3b GreaterThanOrEqual(in Vector3i left, in Vector3i right)
Parameters
Type Name Description
Vector3i left

The left vector.

Vector3i right

The right vector.

Returns
Type Description
Vector3b

A component wise boolean vector whose compoennts are true when the corresponding left component is greater than or equal to the right component.

LessThan(in Vector3i, in Vector3i)

Component wise less than comparision of two vectors.

Declaration
public static Vector3b LessThan(in Vector3i left, in Vector3i right)
Parameters
Type Name Description
Vector3i left

The left vector.

Vector3i right

The right vector.

Returns
Type Description
Vector3b

A component wise boolean vector whose compoennts are true when the corresponding left component is less than the right component.

LessThanOrEqual(in Vector3i, in Vector3i)

Component wise less than or equal comparision of two vectors.

Declaration
public static Vector3b LessThanOrEqual(in Vector3i left, in Vector3i right)
Parameters
Type Name Description
Vector3i left

The left vector.

Vector3i right

The right vector.

Returns
Type Description
Vector3b

A component wise boolean vector whose compoennts are true when the corresponding left component is less than or equal to the right component.

Multiply(Vector3i, Vector3i)

Multiplies a vector by the components a vector (scale).

Declaration
[Pure]
public static Vector3i Multiply(Vector3i vector, Vector3i scale)
Parameters
Type Name Description
Vector3i vector

Left operand.

Vector3i scale

Right operand.

Returns
Type Description
Vector3i

Result of the operation.

Multiply(Vector3i, int)

Multiplies a vector by a scalar.

Declaration
[Pure]
public static Vector3i Multiply(Vector3i vector, int scale)
Parameters
Type Name Description
Vector3i vector

Left operand.

int scale

Right operand.

Returns
Type Description
Vector3i

Result of the operation.

Multiply(in Vector3i, in Vector3i, out Vector3i)

Multiplies a vector by the components of a vector (scale).

Declaration
public static void Multiply(in Vector3i vector, in Vector3i scale, out Vector3i result)
Parameters
Type Name Description
Vector3i vector

Left operand.

Vector3i scale

Right operand.

Vector3i result

Result of the operation.

Multiply(in Vector3i, int, out Vector3i)

Multiplies a vector by a scalar.

Declaration
public static void Multiply(in Vector3i vector, int scale, out Vector3i result)
Parameters
Type Name Description
Vector3i vector

Left operand.

int scale

Right operand.

Vector3i result

Result of the operation.

Subtract(Vector3i, Vector3i)

Subtract one vector from another.

Declaration
[Pure]
public static Vector3i Subtract(Vector3i a, Vector3i b)
Parameters
Type Name Description
Vector3i a

First operand.

Vector3i b

Second operand.

Returns
Type Description
Vector3i

Result of the subtraction.

Subtract(in Vector3i, in Vector3i, out Vector3i)

Subtract one vector from another.

Declaration
public static void Subtract(in Vector3i a, in Vector3i b, out Vector3i result)
Parameters
Type Name Description
Vector3i a

First operand.

Vector3i b

Second operand.

Vector3i 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
ValueType.ToString()

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 (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.

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 (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.

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 (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.

IFormatProvider formatProvider

The provider to use to format the value.

-or-

A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.

Returns
Type Description
string

The value of the current instance in the specified format.

ToVector3()

Gets a Vector3 object with the same component values as the Vector3i instance.

Declaration
public readonly Vector3 ToVector3()
Returns
Type Description
Vector3

The resulting Vector3 instance.

ToVector3(in Vector3i, out Vector3)

Gets a Vector3 object with the same component values as the Vector3i instance.

Declaration
public static void ToVector3(in Vector3i input, out Vector3 result)
Parameters
Type Name Description
Vector3i input

The given Vector3i to convert.

Vector3 result

The resulting Vector3.

Operators

operator +(Vector3i, Vector3i)

Adds two instances.

Declaration
[Pure]
public static Vector3i operator +(Vector3i left, Vector3i right)
Parameters
Type Name Description
Vector3i left

The first instance.

Vector3i right

The second instance.

Returns
Type Description
Vector3i

The result of the calculation.

operator +(Vector3i, int)

Adds a scalar to an instance.

Declaration
[Pure]
public static Vector3i operator +(Vector3i left, int right)
Parameters
Type Name Description
Vector3i left

The instance.

int right

The scalar.

Returns
Type Description
Vector3i

The result of the operation.

operator +(int, Vector3i)

Adds a scalar to an instance.

Declaration
[Pure]
public static Vector3i operator +(int left, Vector3i right)
Parameters
Type Name Description
int left

The scalar.

Vector3i right

The instance.

Returns
Type Description
Vector3i

The result of the operation.

operator /(Vector3i, Vector3i)

Component-wise division between the specified instance by a scale vector.

Declaration
[Pure]
public static Vector3i operator /(Vector3i vec, Vector3i scale)
Parameters
Type Name Description
Vector3i vec

Left operand.

Vector3i scale

Right operand.

Returns
Type Description
Vector3i

Result of the division.

operator /(Vector3i, int)

Divides the instance by a scalar using integer division, floor(a/b).

Declaration
[Pure]
public static Vector3i operator /(Vector3i vec, int scale)
Parameters
Type Name Description
Vector3i vec

The instance.

int scale

The scalar.

Returns
Type Description
Vector3i

Result of the division.

operator /(int, Vector3i)

Divides a scalar by the instance using integer division, floor(a/b).

Declaration
[Pure]
public static Vector3i operator /(int left, Vector3i right)
Parameters
Type Name Description
int left

The scalar.

Vector3i right

The instance.

Returns
Type Description
Vector3i

Result of the division.

operator ==(Vector3i, Vector3i)

Compares two instances for equality.

Declaration
public static bool operator ==(Vector3i left, Vector3i right)
Parameters
Type Name Description
Vector3i left

The first instance.

Vector3i right

The second instance.

Returns
Type Description
bool

True, if left equals right; false otherwise.

explicit operator Vector3h(Vector3i)

Converts OpenTK.Vector3i to OpenTK.Vector3h.

Declaration
[Pure]
public static explicit operator Vector3h(Vector3i vec)
Parameters
Type Name Description
Vector3i vec

The Vector3i to convert.

Returns
Type Description
Vector3h

The resulting Vector3h.

operator >(Vector3i, Vector3i)

Component wise greater than comparision between the specified instances.

Declaration
[Pure]
public static Vector3b operator >(Vector3i left, Vector3i right)
Parameters
Type Name Description
Vector3i left

The left instance.

Vector3i right

The right instance.

Returns
Type Description
Vector3b

A component wise boolean vector whose compoennts are true when the corresponding greater component is greater than the right component.

operator >=(Vector3i, Vector3i)

Component wise greater than or equal comparision between the specified instances.

Declaration
[Pure]
public static Vector3b operator >=(Vector3i left, Vector3i right)
Parameters
Type Name Description
Vector3i left

The left instance.

Vector3i right

The right instance.

Returns
Type Description
Vector3b

A component wise boolean vector whose compoennts are true when the corresponding left component is greater than or equal the right component.

implicit operator Vector3(Vector3i)

Converts OpenTK.Vector3i to OpenTK.Vector3.

Declaration
[Pure]
public static implicit operator Vector3(Vector3i vec)
Parameters
Type Name Description
Vector3i vec

The Vector3i to convert.

Returns
Type Description
Vector3

The resulting Vector3.

implicit operator Vector3d(Vector3i)

Converts OpenTK.Vector3i to OpenTK.Vector3d.

Declaration
[Pure]
public static implicit operator Vector3d(Vector3i vec)
Parameters
Type Name Description
Vector3i vec

The Vector3i to convert.

Returns
Type Description
Vector3d

The resulting Vector3d.

implicit operator Vector3i((int X, int Y, int Z))

Initializes a new instance of the Vector3i struct using a tuple containing the component values.

Declaration
[Pure]
public static implicit operator Vector3i((int X, int Y, int Z) values)
Parameters
Type Name Description
(int X, int Y, int Z) values

A tuple containing the component values.

Returns
Type Description
Vector3i

A new instance of the Vector3i struct with the given component values.

operator !=(Vector3i, Vector3i)

Compares two instances for inequality.

Declaration
public static bool operator !=(Vector3i left, Vector3i right)
Parameters
Type Name Description
Vector3i left

The first instance.

Vector3i right

The second instance.

Returns
Type Description
bool

True, if left does not equal right; false otherwise.

operator <(Vector3i, Vector3i)

Component wise less than comparision between the specified instances.

Declaration
[Pure]
public static Vector3b operator <(Vector3i left, Vector3i right)
Parameters
Type Name Description
Vector3i left

The left instance.

Vector3i right

The right instance.

Returns
Type Description
Vector3b

A component wise boolean vector whose compoennts are true when the corresponding left component is less than the right component.

operator <=(Vector3i, Vector3i)

Component wise less than or equal comparision between the specified instances.

Declaration
[Pure]
public static Vector3b operator <=(Vector3i left, Vector3i right)
Parameters
Type Name Description
Vector3i left

The left instance.

Vector3i right

The right instance.

Returns
Type Description
Vector3b

A component wise boolean vector whose compoennts are true when the corresponding left component is less than or equal the right component.

operator *(Vector3i, Vector3i)

Component-wise multiplication between the specified instance by a scale vector.

Declaration
[Pure]
public static Vector3i operator *(Vector3i vec, Vector3i scale)
Parameters
Type Name Description
Vector3i vec

Right operand.

Vector3i scale

Left operand.

Returns
Type Description
Vector3i

Result of the multiplication.

operator *(Vector3i, int)

Multiplies an instance by an integer scalar.

Declaration
[Pure]
public static Vector3i operator *(Vector3i vec, int scale)
Parameters
Type Name Description
Vector3i vec

The instance.

int scale

The scalar.

Returns
Type Description
Vector3i

The result of the calculation.

operator *(int, Vector3i)

Multiplies an instance by an integer scalar.

Declaration
[Pure]
public static Vector3i operator *(int scale, Vector3i vec)
Parameters
Type Name Description
int scale

The scalar.

Vector3i vec

The instance.

Returns
Type Description
Vector3i

The result of the calculation.

operator -(Vector3i, Vector3i)

Subtracts two instances.

Declaration
[Pure]
public static Vector3i operator -(Vector3i left, Vector3i right)
Parameters
Type Name Description
Vector3i left

The first instance.

Vector3i right

The second instance.

Returns
Type Description
Vector3i

The result of the calculation.

operator -(Vector3i, int)

Subtracts an instance by a scalar.

Declaration
[Pure]
public static Vector3i operator -(Vector3i left, int right)
Parameters
Type Name Description
Vector3i left

The instance.

int right

The scalar.

Returns
Type Description
Vector3i

The result of the operation.

operator -(int, Vector3i)

Subtracts a scalar by an instance.

Declaration
[Pure]
public static Vector3i operator -(int left, Vector3i right)
Parameters
Type Name Description
int left

The scalar.

Vector3i right

The instance.

Returns
Type Description
Vector3i

The result of the operation.

operator -(Vector3i)

Negates an instance.

Declaration
[Pure]
public static Vector3i operator -(Vector3i vec)
Parameters
Type Name Description
Vector3i vec

The instance.

Returns
Type Description
Vector3i

The result of the calculation.

operator +(Vector3i)

Computes the unary plus of the vector.

Declaration
[Pure]
public static Vector3i operator +(Vector3i vec)
Parameters
Type Name Description
Vector3i vec

The instance.

Returns
Type Description
Vector3i

The result of the calculation.

Implements

IEquatable<T>
IFormattable
IAdditionOperators<TSelf, TOther, TResult>
ISubtractionOperators<TSelf, TOther, TResult>
IUnaryNegationOperators<TSelf, TResult>
IUnaryPlusOperators<TSelf, TResult>
IMultiplyOperators<TSelf, TOther, TResult>
IMultiplyOperators<TSelf, TOther, TResult>
IDivisionOperators<TSelf, TOther, TResult>
IDivisionOperators<TSelf, TOther, TResult>
IEqualityOperators<TSelf, TOther, TResult>
IAdditiveIdentity<TSelf, TResult>
IMultiplicativeIdentity<TSelf, TResult>
IMinMaxValue<TSelf>
In this article
Back to top Generated by DocFX