Table of Contents

Struct Vec2s

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

2-Tuple of short (System.Int16)

[Serializable]
public struct Vec2s : IVec<Vec2s, short>, IVec, IEquatable<Vec2s>
Implements
Inherited Members

Constructors

Vec2s(short, short)

Initializer

public Vec2s(short item0, short item1)

Parameters

item0 short
item1 short

Fields

Item0

The value of the first component of this object.

public short Item0

Field Value

short

Item1

The value of the second component of this object.

public short Item1

Field Value

short

Properties

this[int]

Indexer

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

Parameters

i int

Property Value

short

Methods

Add(Vec2s)

this + other

public readonly Vec2s Add(Vec2s other)

Parameters

other Vec2s

Returns

Vec2s

Deconstruct(out short, out short)

Deconstructing a Vector

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

Parameters

item0 short
item1 short

Divide(double)

this / alpha

public readonly Vec2s Divide(double alpha)

Parameters

alpha double

Returns

Vec2s

Equals(Vec2s)

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

public readonly bool Equals(Vec2s other)

Parameters

other Vec2s

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

Parameters

alpha double

Returns

Vec2s

Subtract(Vec2s)

this - other

public readonly Vec2s Subtract(Vec2s other)

Parameters

other Vec2s

Returns

Vec2s

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

ToVec2w()

public Vec2w ToVec2w()

Returns

Vec2w

Operators

operator +(Vec2s, Vec2s)

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

Parameters

a Vec2s
b Vec2s

Returns

Vec2s

operator /(Vec2s, double)

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

Parameters

a Vec2s
alpha double

Returns

Vec2s

operator ==(Vec2s, Vec2s)

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

Parameters

a Vec2s
b Vec2s

Returns

bool

operator !=(Vec2s, Vec2s)

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

Parameters

a Vec2s
b Vec2s

Returns

bool

operator *(Vec2s, double)

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

Parameters

a Vec2s
alpha double

Returns

Vec2s

operator -(Vec2s, Vec2s)

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

Parameters

a Vec2s
b Vec2s

Returns

Vec2s