Table of Contents

Class Fixed3x3Extensions

Namespace
FixedMathSharp
Assembly
FixedMathSharp.dll

Provides extension methods for the Fixed3x3 structure, enabling additional transformation and comparison operations.

public static class Fixed3x3Extensions
Inheritance
Fixed3x3Extensions
Inherited Members

Methods

ExtractLossyScale(Fixed3x3)

Extracts canonical signed lossy scale from the matrix basis rows.

public static Vector3d ExtractLossyScale(this Fixed3x3 matrix)

Parameters

matrix Fixed3x3

Returns

Vector3d

Remarks

A reflected basis assigns its one recoverable negative sign to X.

ExtractScaleMagnitudes(Fixed3x3)

Extracts the unsigned magnitudes of the matrix basis rows.

public static Vector3d ExtractScaleMagnitudes(this Fixed3x3 matrix)

Parameters

matrix Fixed3x3

Returns

Vector3d

The nonnegative basis magnitudes along X, Y, and Z.

FuzzyEqual(Fixed3x3, Fixed3x3, Fixed64?)

Compares two Fixed3x3 for approximate equality, allowing a fractional percentage (defaults to ~1%) difference between components.

public static bool FuzzyEqual(this Fixed3x3 f1, Fixed3x3 f2, Fixed64? percentage = null)

Parameters

f1 Fixed3x3

The current Fixed3x3.

f2 Fixed3x3

The Fixed3x3 to compare against.

percentage Fixed64?

The allowed fractional difference (percentage) for each component.

Returns

bool

True if the components are within the allowed percentage difference, false otherwise.

FuzzyEqualAbsolute(Fixed3x3, Fixed3x3, Fixed64)

Compares two Fixed3x3 for approximate equality, allowing a fixed absolute difference between components.

public static bool FuzzyEqualAbsolute(this Fixed3x3 f1, Fixed3x3 f2, Fixed64 allowedDifference)

Parameters

f1 Fixed3x3

The current Fixed3x3.

f2 Fixed3x3

The Fixed3x3 to compare against.

allowedDifference Fixed64

The allowed absolute difference between each component.

Returns

bool

True if the components are within the allowed difference, false otherwise.

InverseTransformDirection(Fixed3x3, Vector3d)

Transforms a direction from world space into the local space of the matrix. Ignores translation.

public static Vector3d InverseTransformDirection(this Fixed3x3 matrix, Vector3d direction)

Parameters

matrix Fixed3x3

The transformation matrix.

direction Vector3d

The world-space direction.

Returns

Vector3d

The transformed local-space direction.

Lerp(Fixed3x3, Fixed3x3, Fixed64)

Linearly interpolates between two matrices.

public static Fixed3x3 Lerp(this Fixed3x3 matrix, Fixed3x3 target, Fixed64 amount)

Parameters

matrix Fixed3x3
target Fixed3x3
amount Fixed64

Returns

Fixed3x3

TransformDirection(Fixed3x3, Vector3d)

Transforms a direction vector from local space to world space using this transformation matrix. Ignores translation.

public static Vector3d TransformDirection(this Fixed3x3 matrix, Vector3d direction)

Parameters

matrix Fixed3x3

The transformation matrix.

direction Vector3d

The local-space direction vector.

Returns

Vector3d

The transformed direction in world space.

Remarks

FixedMathSharp applies matrices using a row-vector convention: direction * matrix.

Transpose(Fixed3x3)

Transposes the matrix (swaps rows and columns).

public static Fixed3x3 Transpose(this Fixed3x3 matrix)

Parameters

matrix Fixed3x3

Returns

Fixed3x3