Click or drag to resize

Vector2H Structure

A structure encapsulating three half precision floating point values.

Namespace:  NeoAxis
Assembly:  NeoAxis.Core (in NeoAxis.Core.dll) Version: 2024.1.1.0 (2024.1.1.0)
Syntax
C#
public struct Vector2H

The Vector2H type exposes the following members.

Constructors
  NameDescription
Public methodVector2H(Vector2H)
Constructs a vector with another given vector.
Public methodVector2H(Single, Single)
Constructs a vector with the given individual elements.
Public methodVector2H(HalfType, HalfType)
Constructs a vector with the given individual elements.
Top
Properties
  NameDescription
Public propertyItem
Gets or sets the component at the specified index.
Top
Methods
  NameDescription
Public methodStatic memberAbs
Returns a vector whose elements are the absolute values of each of the specified vector's components.
Public methodStatic memberAcos
Calculates the arc-cosine of each component of the specified vector.
Public methodStatic memberAdd
Adds two vectors.
Public methodStatic memberAllNonZero
Determines whether all components of a given vector are unequal to the zero.
Public methodStatic memberAnyNonZero
Determines whether any component of a given vector is unequal to the zero.
Public methodStatic memberAsin
Calculates the arc-sine of each component of the specified vector.
Public methodStatic memberAtan
Calculates the arc-tangent of each component of the specified vector.
Public methodStatic memberAtan2
Returns the vector which contains the angles in radians whose tangents are the quotient of the corresponding components in the first specified vector y and the second specified vector x.
Public methodClamp
Restricts the current instance of Vector2H to be within a specified range and returns the clamped value.
Public methodStatic memberCos
Calculates the cosine of each component of the specified vector.
Public methodStatic memberCosh
Calculates the hyperbolic cosine of each component of the specified vector.
Public methodStatic memberDistance(Vector2H, Vector2H)
Calculates the distance between two vectors.
Public methodStatic memberDistance(Vector2H, Vector2H)
Calculates the distance between two vectors.
Public methodStatic memberDivide(HalfType, Vector2H, Vector2H)
Divides a scalar by a vector.
Public methodStatic memberDivide(Vector2H, HalfType, Vector2H)
Divides a vector by a given scalar.
Public methodStatic memberDivide(Vector2H, Vector2H, Vector2H)
Divides the first vector by the second vector.
Public methodDot(Vector2H)
Calculates the dot product of two vectors.
Public methodDot(Vector2H)
Calculates the dot product of two vectors.
Public methodStatic memberDot(Vector2H, Vector2H)
Calculates the dot product of two vectors.
Public methodStatic memberDot(Vector2H, Vector2H)
Calculates the dot product of two vectors.
Public methodEquals(Object)
Determines whether the specified object is equal to the current instance of Vector2H.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Vector2H, HalfType)
Determines whether the specified vector is equal to the current instance of Vector2H with a given precision.
Public methodEquals(Vector2H, HalfType)
Determines whether the specified vector is equal to the current instance of Vector2H with a given precision.
Public methodStatic memberExp
Returns the vector which contains e raised to the power of n, where n is the corresponding component in the specified vector.
Public methodGetClamp
Restricts the current instance of Vector2H to be within a specified range and returns the clamped value.
Public methodGetHashCode
Returns a hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetSaturate
Clamps the components of the current instance of Vector2H between 0 and 1 and returns the saturated value.
Public methodGetTruncate
Rounds a given vector towards zero for each component in it and returns the truncated vector.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodLength
Calculates the length of the current instance of Vector2H.
Public methodLengthSquared
Calculates the squared length of the current instance of Vector2H.
Public methodStatic memberLerp(Vector2H, Vector2H, HalfType)
Performs a linear interpolation between two vectors based on the given weighting.
Public methodStatic memberLerp(Vector2H, Vector2H, HalfType, Vector2H)
Performs a linear interpolation between two vectors based on the given weighting.
Public methodStatic memberLog
Calculates the natural logarithm of each component of the specified vector.
Public methodStatic memberLog10
Calculates the base 10 logarithm of each component of the specified vector.
Public methodStatic memberMax
Returns a vector containing the largest components of the specified vectors.
Public methodMaxComponent
Returns the value of the largest component of the current instance of Vector2H.
Public methodStatic memberMin
Returns a vector containing the smallest components of the specified vectors.
Public methodMinComponent
Returns the value of the smallest component of the current instance of Vector2H.
Public methodStatic memberMultiply(HalfType, Vector2H, Vector2H)
Multiplies a vector by a given scalar.
Public methodStatic memberMultiply(Vector2H, HalfType, Vector2H)
Multiplies a vector by a given scalar.
Public methodStatic memberMultiply(Vector2H, Vector2H, Vector2H)
Multiplies two vectors together.
Public methodStatic memberNegate
Reverses the direction of a given vector.
Public methodStatic memberParse
Converts a string representation of a vector into the equivalent Vector2H structure.
Public methodStatic memberPow
Returns the vector which contains the components of the first specified vector raised to power of the numbers which are equal to the corresponding components of the second specified vector.
Public methodSaturate
Clamps the components of the current instance of Vector2H between 0 and 1.
Public methodStatic memberSelect
Chooses one of two vectors depending on the pick1 value.
Public methodStatic memberSin
Calculates the sine of each component of the specified vector.
Public methodStatic memberSinh
Calculates the hyperbolic sine of each component of the specified vector.
Public methodStatic memberSqrt
Calculates the square root of each component of the specified vector.
Public methodStatic memberSubtract
Subtracts two vectors.
Public methodStatic memberTan
Calculates the tangent of each component of the specified vector.
Public methodStatic memberTanh
Calculates the hyperbolic tangent of each component of the specified vector.
Public methodToString
Returns a String that represents the current instance of Vector2H.
(Overrides ValueTypeToString.)
Public methodToString(Int32)
Returns a String that represents the current instance of Vector2H with a given precision.
Public methodToVector2
Converts the current instance of Vector2H into the equivalent Vector2 structure.
Public methodToVector2F
Converts the current instance of Vector2H into the equivalent Vector2F structure.
Public methodToVector2H
Converts the current instance of Vector2F into the equivalent Vector2H structure.
Public methodToVector2I
Converts the current instance of Vector2H into the equivalent Vector2I structure.
Public methodTruncate
Rounds the current instance of Vector2H towards zero for each component in a vector.
Top
Operators
  NameDescription
Public operatorStatic memberAddition
Adds two vectors.
Public operatorStatic memberDivision(HalfType, Vector2H)
Divides a scalar by a vector.
Public operatorStatic memberDivision(Vector2H, HalfType)
Divides a vector by a given scalar.
Public operatorStatic memberDivision(Vector2H, Vector2H)
Divides the first vector by the second vector.
Public operatorStatic memberEquality
Determines whether two given vectors are equal.
Public operatorStatic member(Vector2F to Vector2H)
Implicit conversion from Vector2F type to Vector2H type for given value.
Public operatorStatic member(Vector2H to Vector2)
Implicit conversion from Vector2H type to Vector2 type for given value.
Public operatorStatic member(Vector2H to Vector2F)
Implicit conversion from Vector2H type to Vector2F type for given value.
Public operatorStatic memberInequality
Determines whether two given vectors are unequal.
Public operatorStatic memberMultiply(HalfType, Vector2H)
Multiplies a vector by a given scalar.
Public operatorStatic memberMultiply(Vector2H, HalfType)
Multiplies a vector by a given scalar.
Public operatorStatic memberMultiply(Vector2H, Vector2H)
Multiplies two vectors together.
Public operatorStatic memberSubtraction
Subtracts two vectors.
Public operatorStatic memberUnaryNegation
Reverses the direction of a given vector.
Top
Fields
  NameDescription
Public fieldStatic memberOne
Returns the vector (1,1,1).
Public fieldX
The X component of the vector.
Public fieldStatic memberXAxis
Returns the vector (1,0,0).
Public fieldY
The Y component of the vector.
Public fieldStatic memberYAxis
Returns the vector (0,1,0).
Public fieldStatic memberZAxis
Returns the vector (0,0,1).
Public fieldStatic memberZero
Returns the vector (0,0,0).
Top
Extension Methods
See Also