Table of Contents

Class Vector4dExtensions

Namespace
FixedMathSharp
Assembly
FixedMathSharp.dll

Provides extension methods for the Vector4d type to support additional vector operations and comparisons.

public static class Vector4dExtensions
Inheritance
Vector4dExtensions
Inherited Members

Methods

Abs(Vector4d)

Returns a new vector containing the absolute value of each component.

public static Vector4d Abs(this Vector4d value)

Parameters

value Vector4d

Returns

Vector4d

Clamp(Vector4d, Vector4d, Vector4d)

Clamps each component of the given vector within the specified min and max bounds.

public static Vector4d Clamp(this Vector4d value, Vector4d min, Vector4d max)

Parameters

value Vector4d
min Vector4d
max Vector4d

Returns

Vector4d

ClampOne(Vector4d)

Clamps each component of the given vector within the specified min and max bounds.

public static Vector4d ClampOne(this Vector4d value)

Parameters

value Vector4d

Returns

Vector4d

FuzzyEqual(Vector4d, Vector4d, Fixed64?)

Compares two vectors for approximate equality, allowing a fractional difference.

public static bool FuzzyEqual(this Vector4d me, Vector4d other, Fixed64? percentage = null)

Parameters

me Vector4d
other Vector4d
percentage Fixed64?

Returns

bool

FuzzyEqualAbsolute(Vector4d, Vector4d, Fixed64)

Compares two vectors for approximate equality, allowing a fixed absolute difference.

public static bool FuzzyEqualAbsolute(this Vector4d me, Vector4d other, Fixed64 allowedDifference)

Parameters

me Vector4d
other Vector4d
allowedDifference Fixed64

Returns

bool

Lerp(Vector4d, Vector4d, Fixed64)

Linearly interpolates between two vectors, clamping the interpolation amount to [0, 1].

public static Vector4d Lerp(this Vector4d start, Vector4d end, Fixed64 amount)

Parameters

start Vector4d
end Vector4d
amount Fixed64

Returns

Vector4d

Max(Vector4d, Vector4d)

Returns a vector whose elements are the maximum of each pair of elements.

public static Vector4d Max(this Vector4d value, Vector4d other)

Parameters

value Vector4d
other Vector4d

Returns

Vector4d

Midpoint(Vector4d, Vector4d)

Computes the midpoint between two vectors.

public static Vector4d Midpoint(this Vector4d value, Vector4d other)

Parameters

value Vector4d
other Vector4d

Returns

Vector4d

Min(Vector4d, Vector4d)

Returns a vector whose elements are the minimum of each pair of elements.

public static Vector4d Min(this Vector4d value, Vector4d other)

Parameters

value Vector4d
other Vector4d

Returns

Vector4d

Sign(Vector4d)

Returns a new vector containing the sign of each component.

public static Vector4d Sign(this Vector4d value)

Parameters

value Vector4d

Returns

Vector4d

Transform(Vector4d, Fixed4x4)

Transforms a 4D vector by a 4x4 matrix.

public static Vector4d Transform(this Vector4d vector, Fixed4x4 matrix)

Parameters

vector Vector4d
matrix Fixed4x4

Returns

Vector4d

Remarks

This follows the same row-vector storage convention as TransformPoint(Fixed4x4, Vector3d), preserving the computed W component instead of performing perspective division.

UnclampedLerp(Vector4d, Vector4d, Fixed64)

Linearly interpolates between two vectors without clamping the interpolation amount.

public static Vector4d UnclampedLerp(this Vector4d start, Vector4d end, Fixed64 amount)

Parameters

start Vector4d
end Vector4d
amount Fixed64

Returns

Vector4d