HVector2

public Half X

Language: C#

The X component of the vector.

public Half Y

Language: C#

The Y component of the vector.

public HVector2(Half x, Half y)

Language: C#

Initializes a new instance of the [] struct.

Parameters:

  • x: The X component of the vector.
  • y: The Y component of the vector.

public HVector2(HVector2 other)

Language: C#

Initializes a new instance of the [] struct by copying another vector.

Parameters:

  • other: The vector to copy.

public HVector2(HVector3 other)

Language: C#

Initializes a new instance of the [] struct from a HVector3 by dropping extra components.

Parameters:

  • other: The HVector3 to convert.

public Half R

Language: C#

Red component of the vector.

public Half G

Language: C#

Green component of the vector.

public Half LengthSquared

Language: C#

Returns squared length of the vector.

Returns: The squared length of the vector.

public Half Length

Language: C#

Returns length of the vector.

Returns: The length of the vector.

public HVector2 Normalized

Language: C#

public static HVector2 Zero

Language: C#

Returns a vector with all components set to zero.

Returns: A zero vector.

public static HVector2 One

Language: C#

Returns a vector with all components set to one.

Returns: A one vector.

public static HVector2 Right

Language: C#

Returns a unit vector pointing in the positive X direction.

Returns: A unit vector in the positive X direction.

public static HVector2 Left

Language: C#

Returns a unit vector pointing in the negative X direction.

Returns: A unit vector in the negative X direction.

public static HVector2 Up

Language: C#

Returns a unit vector pointing in the positive Y direction.

Returns: A unit vector in the positive Y direction.

public static HVector2 Down

Language: C#

Returns a unit vector pointing in the negative Y direction.

Returns: A unit vector in the negative Y direction.

public override string ToString()

Language: C#

public override int GetHashCode()

Language: C#

public static Half DistanceSquared(HVector2 a, HVector2 b)

Language: C#

Calculates the squared distance between two HVector2 vectors.

Parameters:

  • a: The first vector.
  • b: The second vector.

Returns: The squared distance between the two vectors.

public static Half Distance(HVector2 a, HVector2 b)

Language: C#

Calculates the distance between two HVector2 vectors.

Parameters:

  • a: The first vector.
  • b: The second vector.

Returns: The distance between the two vectors.

public static Half Dot(HVector2 a, HVector2 b)

Language: C#

Calculates the dot product of two HVector2 vectors.

Parameters:

  • a: The first vector.
  • b: The second vector.

Returns: The dot product of the two vectors.

public static Half Cross(HVector2 a, HVector2 b)

Language: C#

Calculates the cross product (as a scalar) of two HVector2 vectors.

Parameters:

  • a: The first vector.
  • b: The second vector.

Returns: The cross product (as a scalar) of the two vectors.

public static HVector2 Abs(HVector2 v)

Language: C#

Absolute value of a HVector2 vector.

Parameters:

  • v: The vector.

Returns: The vector with absolute component values.

public static HVector2 ComponentMin(HVector2 a, HVector2 b)

Language: C#

Returns the minimum components of two HVector2 vectors.

Parameters:

  • a: The first vector.
  • b: The second vector.

Returns: The vector with the minimum components.

public static HVector2 ComponentMax(HVector2 a, HVector2 b)

Language: C#

Returns the maximum components of two HVector2 vectors.

Parameters:

  • a: The first vector.
  • b: The second vector.

Returns: The vector with the maximum components.

public static HVector2 Lerp(HVector2 a, HVector2 b, Half t)

Language: C#

Returns linearly interpolated vector between two HVector2 vectors.

Parameters:

  • a: The first vector.
  • b: The second vector.
  • t: The interpolation factor (0.0 - 1.0).

Returns: The interpolated vector.

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

Language: C#

Adds two HVector2 vectors.

Parameters:

  • a: The first vector.
  • b: The second vector.

Returns: The sum of the two vectors.

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

Language: C#

Subtracts two HVector2 vectors.

Parameters:

  • a: The first vector.
  • b: The second vector.

Returns: The difference of the two vectors.

public static operator HVector2 *(HVector2 v, Half scalar)

Language: C#

Multiplies a HVector2 vector by a scalar.

Parameters:

  • v: The vector.
  • scalar: The scalar.

Returns: The scaled vector.

public static operator HVector2 *(Half scalar, HVector2 v)

Language: C#

Multiplies a scalar by a HVector2 vector.

Parameters:

  • scalar: The scalar.
  • v: The vector.

Returns: The scaled vector.

public static operator HVector2 *(HVector2 a, HVector2 b)

Language: C#

Multiplies a HVector2 vector component-wise by another HVector2 vector.

Parameters:

  • a: The first vector.
  • b: The second vector.

Returns: The component-wise multiplied vector.

public static operator HVector2 /(HVector2 v, Half scalar)

Language: C#

Divides a HVector2 vector by a scalar.

Parameters:

  • v: The vector.
  • scalar: The scalar.

Returns: The scaled vector.

public static operator HVector2 /(Half scalar, HVector2 v)

Language: C#

Divides a scalar by a HVector2 vector.

Parameters:

  • scalar: The scalar.
  • v: The vector.

Returns: The scaled vector.

public static operator HVector2 /(HVector2 a, HVector2 b)

Language: C#

Divides a HVector2 vector component-wise by another HVector2 vector.

Parameters:

  • a: The first vector.
  • b: The second vector.

Returns: The component-wise divided vector.

public static operator HVector2 %(HVector2 v, Half scalar)

Language: C#

Finds a remainder of HVector2 vector by a scalar.

Parameters:

  • v: The vector.
  • scalar: The scalar.

Returns: The scaled vector.

public static operator HVector2 %(HVector2 a, HVector2 b)

Language: C#

Finds a remainder of HVector2 vector component-wise by another HVector2 vector.

Parameters:

  • a: The first vector.
  • b: The second vector.

Returns: The component-wise divided vector.

public static operator HVector2 -(HVector2 v)

Language: C#

Negates a HVector2 vector.

Parameters:

  • v: The vector.

Returns: The negated vector.

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

Language: C#

Checks if two HVector2 vectors are equal.

Parameters:

  • a: The first vector.
  • b: The second vector.

Returns: True if the vectors are equal, false otherwise.

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

Language: C#

Checks if two HVector2 vectors are not equal.

Parameters:

  • a: The first vector.
  • b: The second vector.

Returns: True if the vectors are not equal, false otherwise.

public bool Equals(HVector2 other)

Language: C#

public override bool Equals(object? obj)

Language: C#