Table of Contents

Struct Vec2i

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

2-Tuple of int (System.Int32)

[Serializable]
[SuppressMessage("Design", "CA1051: Do not declare visible instance fields")]
public struct Vec2i : IVec<Vec2i, int>, IVec, IEquatable<Vec2i>
Implements
Inherited Members

Constructors

Vec2i(int, int)

Initializer

public Vec2i(int item0, int item1)

Parameters

item0 int
item1 int

Fields

Item0

The value of the first component of this object.

public int Item0

Field Value

int

Item1

The value of the second component of this object.

public int Item1

Field Value

int

Properties

this[int]

Indexer

public int this[int i] { readonly get; set; }

Parameters

i int

Property Value

int

Methods

Add(Vec2i)

this + other

public readonly Vec2i Add(Vec2i other)

Parameters

other Vec2i

Returns

Vec2i

Deconstruct(out int, out int)

Deconstructing a Vector

public readonly void Deconstruct(out int item0, out int item1)

Parameters

item0 int
item1 int

Divide(double)

this / alpha

public readonly Vec2i Divide(double alpha)

Parameters

alpha double

Returns

Vec2i

Equals(Vec2i)

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

public readonly bool Equals(Vec2i other)

Parameters

other Vec2i

An object to compare with this object.

Returns

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.

public override readonly bool Equals(object? obj)

Parameters

obj object

The 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 readonly int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Multiply(double)

this * alpha

public readonly Vec2i Multiply(double alpha)

Parameters

alpha double

Returns

Vec2i

Subtract(Vec2i)

this - other

public readonly Vec2i Subtract(Vec2i other)

Parameters

other Vec2i

Returns

Vec2i

ToString()

Returns the fully qualified type name of this instance.

public override readonly string ToString()

Returns

string

The fully qualified type name.

ToVec2d()

public Vec2d ToVec2d()

Returns

Vec2d

ToVec2f()

public Vec2f ToVec2f()

Returns

Vec2f

Operators

operator +(Vec2i, Vec2i)

public static Vec2i operator +(Vec2i a, Vec2i b)

Parameters

a Vec2i
b Vec2i

Returns

Vec2i

operator /(Vec2i, double)

public static Vec2i operator /(Vec2i a, double alpha)

Parameters

a Vec2i
alpha double

Returns

Vec2i

operator ==(Vec2i, Vec2i)

public static bool operator ==(Vec2i a, Vec2i b)

Parameters

a Vec2i
b Vec2i

Returns

bool

operator !=(Vec2i, Vec2i)

public static bool operator !=(Vec2i a, Vec2i b)

Parameters

a Vec2i
b Vec2i

Returns

bool

operator *(Vec2i, double)

public static Vec2i operator *(Vec2i a, double alpha)

Parameters

a Vec2i
alpha double

Returns

Vec2i

operator -(Vec2i, Vec2i)

public static Vec2i operator -(Vec2i a, Vec2i b)

Parameters

a Vec2i
b Vec2i

Returns

Vec2i