Table of Contents

Struct Vec2b

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

2-Tuple of byte (System.Byte)

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

Constructors

Vec2b(byte, byte)

Initializer

public Vec2b(byte item0, byte item1)

Parameters

item0 byte
item1 byte

Fields

Item0

The value of the first component of this object.

public byte Item0

Field Value

byte

Item1

The value of the second component of this object.

public byte Item1

Field Value

byte

Properties

this[int]

Indexer

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

Parameters

i int

Property Value

byte

Methods

Add(Vec2b)

this + other

public readonly Vec2b Add(Vec2b other)

Parameters

other Vec2b

Returns

Vec2b

All(byte)

returns a Vec with all elements set to v0

public static Vec2b All(byte v0)

Parameters

v0 byte

Returns

Vec2b

Deconstruct(out byte, out byte)

Deconstructing a Vector

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

Parameters

item0 byte
item1 byte

Divide(double)

this / alpha

public readonly Vec2b Divide(double alpha)

Parameters

alpha double

Returns

Vec2b

Equals(Vec2b)

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

public readonly bool Equals(Vec2b other)

Parameters

other Vec2b

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 Vec2b Multiply(double alpha)

Parameters

alpha double

Returns

Vec2b

Subtract(Vec2b)

this - other

public readonly Vec2b Subtract(Vec2b other)

Parameters

other Vec2b

Returns

Vec2b

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

ToVec2i()

public Vec2i ToVec2i()

Returns

Vec2i

ToVec2s()

public Vec2s ToVec2s()

Returns

Vec2s

ToVec2w()

public Vec2w ToVec2w()

Returns

Vec2w

Operators

operator +(Vec2b, Vec2b)

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

Parameters

a Vec2b
b Vec2b

Returns

Vec2b

operator /(Vec2b, double)

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

Parameters

a Vec2b
alpha double

Returns

Vec2b

operator ==(Vec2b, Vec2b)

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

Parameters

a Vec2b
b Vec2b

Returns

bool

operator !=(Vec2b, Vec2b)

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

Parameters

a Vec2b
b Vec2b

Returns

bool

operator *(Vec2b, double)

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

Parameters

a Vec2b
alpha double

Returns

Vec2b

operator -(Vec2b, Vec2b)

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

Parameters

a Vec2b
b Vec2b

Returns

Vec2b