Table of Contents

Struct Vec2f

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

2-Tuple of float (System.Single)

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

Constructors

Vec2f(float, float)

Initializer

public Vec2f(float item0, float item1)

Parameters

item0 float
item1 float

Fields

Item0

The value of the first component of this object.

public float Item0

Field Value

float

Item1

The value of the second component of this object.

public float Item1

Field Value

float

Properties

this[int]

Indexer

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

Parameters

i int

Property Value

float

Methods

Add(Vec2f)

this + other

public readonly Vec2f Add(Vec2f other)

Parameters

other Vec2f

Returns

Vec2f

Deconstruct(out float, out float)

Deconstructing a Vector

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

Parameters

item0 float
item1 float

Divide(double)

this / alpha

public readonly Vec2f Divide(double alpha)

Parameters

alpha double

Returns

Vec2f

Equals(Vec2f)

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

public readonly bool Equals(Vec2f other)

Parameters

other Vec2f

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

Parameters

alpha double

Returns

Vec2f

Subtract(Vec2f)

this - other

public readonly Vec2f Subtract(Vec2f other)

Parameters

other Vec2f

Returns

Vec2f

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

ToVec2i()

public Vec2i ToVec2i()

Returns

Vec2i

Operators

operator +(Vec2f, Vec2f)

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

Parameters

a Vec2f
b Vec2f

Returns

Vec2f

operator /(Vec2f, double)

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

Parameters

a Vec2f
alpha double

Returns

Vec2f

operator ==(Vec2f, Vec2f)

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

Parameters

a Vec2f
b Vec2f

Returns

bool

operator !=(Vec2f, Vec2f)

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

Parameters

a Vec2f
b Vec2f

Returns

bool

operator *(Vec2f, double)

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

Parameters

a Vec2f
alpha double

Returns

Vec2f

operator -(Vec2f, Vec2f)

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

Parameters

a Vec2f
b Vec2f

Returns

Vec2f