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
valueVector4d
Returns
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
Returns
ClampOne(Vector4d)
Clamps each component of the given vector within the specified min and max bounds.
public static Vector4d ClampOne(this Vector4d value)
Parameters
valueVector4d
Returns
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
Returns
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
Returns
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
Returns
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
Returns
Midpoint(Vector4d, Vector4d)
Computes the midpoint between two vectors.
public static Vector4d Midpoint(this Vector4d value, Vector4d other)
Parameters
Returns
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
Returns
Sign(Vector4d)
Returns a new vector containing the sign of each component.
public static Vector4d Sign(this Vector4d value)
Parameters
valueVector4d
Returns
Transform(Vector4d, Fixed4x4)
Transforms a 4D vector by a 4x4 matrix.
public static Vector4d Transform(this Vector4d vector, Fixed4x4 matrix)
Parameters
Returns
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)