Struct Vec4f
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
4-Tuple of float (System.Single)
[Serializable]
[SuppressMessage("Design", "CA1051: Do not declare visible instance fields")]
public struct Vec4f : IVec<Vec4f, float>, IVec, IEquatable<Vec4f>
- Implements
- Inherited Members
Constructors
Vec4f(float, float, float, float)
Initializer
public Vec4f(float item0, float item1, float item2, float item3)
Parameters
Fields
Item0
The value of the first component of this object.
public float Item0
Field Value
Item1
The value of the second component of this object.
public float Item1
Field Value
Item2
The value of the third component of this object.
public float Item2
Field Value
Item3
The value of the fourth component of this object.
public float Item3
Field Value
Properties
this[int]
Indexer
public float this[int i] { readonly get; set; }
Parameters
iint
Property Value
Methods
Add(Vec4f)
this + other
public readonly Vec4f Add(Vec4f other)
Parameters
otherVec4f
Returns
Deconstruct(out float, out float, out float, out float)
Deconstructing a Vector
public readonly void Deconstruct(out float item0, out float item1, out float item2, out float item3)
Parameters
Divide(double)
this / alpha
public readonly Vec4f Divide(double alpha)
Parameters
alphadouble
Returns
Equals(Vec4f)
Indicates whether the current object is equal to another object of the same type.
public readonly bool Equals(Vec4f other)
Parameters
otherVec4fAn 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 Vec4f Multiply(double alpha)
Parameters
alphadouble
Returns
Subtract(Vec4f)
this - other
public readonly Vec4f Subtract(Vec4f other)
Parameters
otherVec4f
Returns
ToString()
Returns the fully qualified type name of this instance.
public override readonly string ToString()
Returns
- string
The fully qualified type name.
ToVec4d()
public Vec4d ToVec4d()
Returns
ToVec4i()
public Vec4i ToVec4i()
Returns
Operators
operator +(Vec4f, Vec4f)
public static Vec4f operator +(Vec4f a, Vec4f b)
Parameters
Returns
operator /(Vec4f, double)
public static Vec4f operator /(Vec4f a, double alpha)
Parameters
Returns
operator ==(Vec4f, Vec4f)
public static bool operator ==(Vec4f a, Vec4f b)
Parameters
Returns
operator !=(Vec4f, Vec4f)
public static bool operator !=(Vec4f a, Vec4f b)
Parameters
Returns
operator *(Vec4f, double)
public static Vec4f operator *(Vec4f a, double alpha)
Parameters
Returns
operator -(Vec4f, Vec4f)
public static Vec4f operator -(Vec4f a, Vec4f b)