﻿Vector2H Structure

# Vector2H Structure

A structure encapsulating three half precision floating point values.

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

The Vector2H type exposes the following members.

Constructors
NameDescription
Vector2H(Vector2H)
Constructs a vector with another given vector.
Vector2H(Single, Single)
Constructs a vector with the given individual elements.
Vector2H(HalfType, HalfType)
Constructs a vector with the given individual elements.
Top
Properties
NameDescription
Item
Gets or sets the component at the specified index.
Top
Methods
NameDescription
Abs
Returns a vector whose elements are the absolute values of each of the specified vector's components.
Acos
Calculates the arc-cosine of each component of the specified vector.
AllNonZero
Determines whether all components of a given vector are unequal to the zero.
AnyNonZero
Determines whether any component of a given vector is unequal to the zero.
Asin
Calculates the arc-sine of each component of the specified vector.
Atan
Calculates the arc-tangent of each component of the specified vector.
Atan2
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.
Clamp
Restricts the current instance of Vector2H to be within a specified range and returns the clamped value.
Cos
Calculates the cosine of each component of the specified vector.
Cosh
Calculates the hyperbolic cosine of each component of the specified vector.
Distance(Vector2H, Vector2H)
Calculates the distance between two vectors.
Distance(Vector2H, Vector2H)
Calculates the distance between two vectors.
Divide(HalfType, Vector2H, Vector2H)
Divides a scalar by a vector.
Divide(Vector2H, HalfType, Vector2H)
Divides a vector by a given scalar.
Divide(Vector2H, Vector2H, Vector2H)
Divides the first vector by the second vector.
Dot(Vector2H)
Calculates the dot product of two vectors.
Dot(Vector2H)
Calculates the dot product of two vectors.
Dot(Vector2H, Vector2H)
Calculates the dot product of two vectors.
Dot(Vector2H, Vector2H)
Calculates the dot product of two vectors.
Equals(Object)
Determines whether the specified object is equal to the current instance of Vector2H.
(Overrides ValueTypeEquals(Object).)
Equals(Vector2H, HalfType)
Determines whether the specified vector is equal to the current instance of Vector2H with a given precision.
Equals(Vector2H, HalfType)
Determines whether the specified vector is equal to the current instance of Vector2H with a given precision.
Exp
Returns the vector which contains e raised to the power of n, where n is the corresponding component in the specified vector.
GetClamp
Restricts the current instance of Vector2H to be within a specified range and returns the clamped value.
GetHashCode
Returns a hash code for this instance.
(Overrides ValueTypeGetHashCode.)
GetSaturate
Clamps the components of the current instance of Vector2H between 0 and 1 and returns the saturated value.
GetTruncate
Rounds a given vector towards zero for each component in it and returns the truncated vector.
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Length
Calculates the length of the current instance of Vector2H.
LengthSquared
Calculates the squared length of the current instance of Vector2H.
Lerp(Vector2H, Vector2H, HalfType)
Performs a linear interpolation between two vectors based on the given weighting.
Lerp(Vector2H, Vector2H, HalfType, Vector2H)
Performs a linear interpolation between two vectors based on the given weighting.
Log
Calculates the natural logarithm of each component of the specified vector.
Log10
Calculates the base 10 logarithm of each component of the specified vector.
Max
Returns a vector containing the largest components of the specified vectors.
MaxComponent
Returns the value of the largest component of the current instance of Vector2H.
Min
Returns a vector containing the smallest components of the specified vectors.
MinComponent
Returns the value of the smallest component of the current instance of Vector2H.
Multiply(HalfType, Vector2H, Vector2H)
Multiplies a vector by a given scalar.
Multiply(Vector2H, HalfType, Vector2H)
Multiplies a vector by a given scalar.
Multiply(Vector2H, Vector2H, Vector2H)
Multiplies two vectors together.
Negate
Reverses the direction of a given vector.
Parse
Converts a string representation of a vector into the equivalent Vector2H structure.
Pow
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.
Saturate
Clamps the components of the current instance of Vector2H between 0 and 1.
Select
Chooses one of two vectors depending on the pick1 value.
Sin
Calculates the sine of each component of the specified vector.
Sinh
Calculates the hyperbolic sine of each component of the specified vector.
Sqrt
Calculates the square root of each component of the specified vector.
Subtract
Subtracts two vectors.
Tan
Calculates the tangent of each component of the specified vector.
Tanh
Calculates the hyperbolic tangent of each component of the specified vector.
ToString
Returns a String that represents the current instance of Vector2H.
(Overrides ValueTypeToString.)
ToString(Int32)
Returns a String that represents the current instance of Vector2H with a given precision.
ToVector2
Converts the current instance of Vector2H into the equivalent Vector2 structure.
ToVector2F
Converts the current instance of Vector2H into the equivalent Vector2F structure.
ToVector2H
Converts the current instance of Vector2F into the equivalent Vector2H structure.
ToVector2I
Converts the current instance of Vector2H into the equivalent Vector2I structure.
Truncate
Rounds the current instance of Vector2H towards zero for each component in a vector.
Top
Operators
NameDescription
Division(HalfType, Vector2H)
Divides a scalar by a vector.
Division(Vector2H, HalfType)
Divides a vector by a given scalar.
Division(Vector2H, Vector2H)
Divides the first vector by the second vector.
Equality
Determines whether two given vectors are equal.
(Vector2F to Vector2H)
Implicit conversion from Vector2F type to Vector2H type for given value.
(Vector2H to Vector2)
Implicit conversion from Vector2H type to Vector2 type for given value.
(Vector2H to Vector2F)
Implicit conversion from Vector2H type to Vector2F type for given value.
Inequality
Determines whether two given vectors are unequal.
Multiply(HalfType, Vector2H)
Multiplies a vector by a given scalar.
Multiply(Vector2H, HalfType)
Multiplies a vector by a given scalar.
Multiply(Vector2H, Vector2H)
Multiplies two vectors together.
Subtraction
Subtracts two vectors.
UnaryNegation
Reverses the direction of a given vector.
Top
Fields
NameDescription
One
Returns the vector (1,1,1).
X
The X component of the vector.
XAxis
Returns the vector (1,0,0).
Y
The Y component of the vector.
YAxis
Returns the vector (0,1,0).
ZAxis
Returns the vector (0,0,1).
Zero
Returns the vector (0,0,0).
Top
Extension Methods
NameDescription
MethodInvoke
Calls the object method by name.
(Defined by ObjectEx.)