LVector2

public long X

Language: C#

The X component of the vector.

public long Y

Language: C#

The Y component of the vector.

public LVector2(long x, long 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 LVector2(LVector2 other)

Language: C#

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

Parameters:

  • other: The vector to copy.

public LVector2(LVector3 other)

Language: C#

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

Parameters:

  • other: The LVector3 to convert.

public long R

Language: C#

Red component of the vector.

public long G

Language: C#

Green component of the vector.

public long LengthSquared

Language: C#

Returns squared length of the vector.

Returns: The squared length of the vector.

public double Length

Language: C#

Returns length of the vector.

Returns: The length of the vector.

public DVector2 Normalized

Language: C#

public static LVector2 Zero

Language: C#

Returns a vector with all components set to zero.

Returns: A zero vector.

public static LVector2 One

Language: C#

Returns a vector with all components set to one.

Returns: A one vector.

public static LVector2 Right

Language: C#

Returns a unit vector pointing in the positive X direction.

Returns: A unit vector in the positive X direction.

public static LVector2 Left

Language: C#

Returns a unit vector pointing in the negative X direction.

Returns: A unit vector in the negative X direction.

public static LVector2 Up

Language: C#

Returns a unit vector pointing in the positive Y direction.

Returns: A unit vector in the positive Y direction.

public static LVector2 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 long DistanceSquared(LVector2 a, LVector2 b)

Language: C#

Calculates the squared distance between two LVector2 vectors.

Parameters:

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

Returns: The squared distance between the two vectors.

public static double Distance(LVector2 a, LVector2 b)

Language: C#

Calculates the distance between two LVector2 vectors.

Parameters:

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

Returns: The distance between the two vectors.

public static long Dot(LVector2 a, LVector2 b)

Language: C#

Calculates the dot product of two LVector2 vectors.

Parameters:

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

Returns: The dot product of the two vectors.

public static long Cross(LVector2 a, LVector2 b)

Language: C#

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

Parameters:

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

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

public static LVector2 Abs(LVector2 v)

Language: C#

Absolute value of a LVector2 vector.

Parameters:

  • v: The vector.

Returns: The vector with absolute component values.

public static LVector2 ComponentMin(LVector2 a, LVector2 b)

Language: C#

Returns the minimum components of two LVector2 vectors.

Parameters:

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

Returns: The vector with the minimum components.

public static LVector2 ComponentMax(LVector2 a, LVector2 b)

Language: C#

Returns the maximum components of two LVector2 vectors.

Parameters:

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

Returns: The vector with the maximum components.

public static DVector2 Lerp(LVector2 a, LVector2 b, double t)

Language: C#

Returns linearly interpolated vector between two LVector2 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 LVector2 +(LVector2 a, LVector2 b)

Language: C#

Adds two LVector2 vectors.

Parameters:

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

Returns: The sum of the two vectors.

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

Language: C#

Subtracts two LVector2 vectors.

Parameters:

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

Returns: The difference of the two vectors.

public static operator LVector2 *(LVector2 v, long scalar)

Language: C#

Multiplies a LVector2 vector by a scalar.

Parameters:

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

Returns: The scaled vector.

public static operator LVector2 *(long scalar, LVector2 v)

Language: C#

Multiplies a scalar by a LVector2 vector.

Parameters:

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

Returns: The scaled vector.

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

Language: C#

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

Parameters:

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

Returns: The component-wise multiplied vector.

public static operator LVector2 /(LVector2 v, long scalar)

Language: C#

Divides a LVector2 vector by a scalar.

Parameters:

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

Returns: The scaled vector.

public static operator LVector2 /(long scalar, LVector2 v)

Language: C#

Divides a scalar by a LVector2 vector.

Parameters:

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

Returns: The scaled vector.

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

Language: C#

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

Parameters:

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

Returns: The component-wise divided vector.

public static operator LVector2 %(LVector2 v, long scalar)

Language: C#

Finds a remainder of LVector2 vector by a scalar.

Parameters:

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

Returns: The scaled vector.

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

Language: C#

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

Parameters:

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

Returns: The component-wise divided vector.

public static operator LVector2 -(LVector2 v)

Language: C#

Negates a LVector2 vector.

Parameters:

  • v: The vector.

Returns: The negated vector.

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

Language: C#

Checks if two LVector2 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 !=(LVector2 a, LVector2 b)

Language: C#

Checks if two LVector2 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(LVector2 other)

Language: C#

public override bool Equals(object? obj)

Language: C#