< Summary

Information
Class: FixedMathSharp.Fixed4x4Extensions
Assembly: FixedMathSharp
File(s): /home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Numerics/Matrices/Fixed4x4.Extensions.cs
Line coverage
100%
Covered lines: 24
Uncovered lines: 0
Coverable lines: 24
Total lines: 64
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ExtractLossyScale(...)100%11100%
SetGlobalScale(...)100%11100%
SetTranslation(...)100%11100%
SetRotation(...)100%11100%
NormalizeRotationMatrix(...)100%11100%
TransformPoint(...)100%11100%
Transform(...)100%11100%
InverseTransformPoint(...)100%11100%

File(s)

/home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Numerics/Matrices/Fixed4x4.Extensions.cs

#LineLine coverage
 1using System.Runtime.CompilerServices;
 2
 3namespace FixedMathSharp;
 4
 5/// <summary>
 6/// Provides extension methods for the Fixed4x4 structure to simplify common matrix operations
 7/// such as extracting scale, setting transformation components, and transforming points.
 8/// </summary>
 9public static class Fixed4x4Extensions
 10{
 11    #region Extraction, and Setters
 12
 13    /// <inheritdoc cref="Fixed4x4.ExtractLossyScale(Fixed4x4)" />
 14    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 15    public static Vector3d ExtractLossyScale(this Fixed4x4 matrix)
 316    {
 317        return Fixed4x4.ExtractLossyScale(matrix);
 318    }
 19
 20    /// <inheritdoc cref="Fixed4x4.SetGlobalScale(Fixed4x4, Vector3d)" />
 21    public static Fixed4x4 SetGlobalScale(this ref Fixed4x4 matrix, Vector3d globalScale)
 222    {
 223        return matrix = Fixed4x4.SetGlobalScale(matrix, globalScale);
 224    }
 25
 26    /// <inheritdoc cref="Fixed4x4.SetTranslation(Fixed4x4, Vector3d)" />
 27    public static Fixed4x4 SetTranslation(this ref Fixed4x4 matrix, Vector3d position)
 128    {
 129        return matrix = Fixed4x4.SetTranslation(matrix, position);
 130    }
 31
 32    /// <inheritdoc cref="Fixed4x4.SetRotation(Fixed4x4, FixedQuaternion)" />
 33    public static Fixed4x4 SetRotation(this ref Fixed4x4 matrix, FixedQuaternion rotation)
 134    {
 135        return matrix = Fixed4x4.SetRotation(matrix, rotation);
 136    }
 37
 38    /// <inheritdoc cref="Fixed4x4.NormalizeRotationMatrix(Fixed4x4)" />
 39    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 40    public static Fixed4x4 NormalizeRotationMatrix(this ref Fixed4x4 matrix)
 141    {
 142        return matrix = Fixed4x4.NormalizeRotationMatrix(matrix);
 143    }
 44
 45    /// <inheritdoc cref="Fixed4x4.TransformPoint(Fixed4x4, Vector3d)" />
 46    public static Vector3d TransformPoint(this Fixed4x4 matrix, Vector3d point)
 147    {
 148        return Fixed4x4.TransformPoint(matrix, point);
 149    }
 50
 51    /// <inheritdoc cref="Fixed4x4.Transform(Fixed4x4, Vector4d)" />
 52    public static Vector4d Transform(this Fixed4x4 matrix, Vector4d vector)
 153    {
 154        return Fixed4x4.Transform(matrix, vector);
 155    }
 56
 57    /// <inheritdoc cref="Fixed4x4.InverseTransformPoint(Fixed4x4, Vector3d)" />
 58    public static Vector3d InverseTransformPoint(this Fixed4x4 matrix, Vector3d point)
 159    {
 160        return Fixed4x4.InverseTransformPoint(matrix, point);
 161    }
 62
 63    #endregion
 64}