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
Fields
Item0
The value of the first component of this object.
public short Item0
Field Value
Item1
The value of the second component of this object.
public short Item1
Field Value
Properties
this[int]
Indexer
public short this[int i] { readonly get; set; }
Parameters
iint
Property Value
Methods
Add(Vec2s)
this + other
public readonly Vec2s Add(Vec2s other)
Parameters
otherVec2s
Returns
Deconstruct(out short, out short)
Deconstructing a Vector
public readonly void Deconstruct(out short item0, out short item1)
Parameters
Divide(double)
this / alpha
public readonly Vec2s Divide(double alpha)
Parameters
alphadouble
Returns
Equals(Vec2s)
Indicates whether the current object is equal to another object of the same type.
public readonly bool Equals(Vec2s other)
Parameters
otherVec2sAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override readonly bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand 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
alphadouble
Returns
Subtract(Vec2s)
this - other
public readonly Vec2s Subtract(Vec2s other)
Parameters
otherVec2s
Returns
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
ToVec2f()
public Vec2f ToVec2f()
Returns
ToVec2i()
public Vec2i ToVec2i()
Returns
ToVec2w()
public Vec2w ToVec2w()
Returns
Operators
operator +(Vec2s, Vec2s)
public static Vec2s operator +(Vec2s a, Vec2s b)
Parameters
Returns
operator /(Vec2s, double)
public static Vec2s operator /(Vec2s a, double alpha)
Parameters
Returns
operator ==(Vec2s, Vec2s)
public static bool operator ==(Vec2s a, Vec2s b)
Parameters
Returns
operator !=(Vec2s, Vec2s)
public static bool operator !=(Vec2s a, Vec2s b)
Parameters
Returns
operator *(Vec2s, double)
public static Vec2s operator *(Vec2s a, double alpha)
Parameters
Returns
operator -(Vec2s, Vec2s)
public static Vec2s operator -(Vec2s a, Vec2s b)