< Summary

Information
Class: FixedMathSharp.Geometry.CylinderPairValueDerivative
Assembly: FixedMathSharp
File(s): /home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Geometry/Wide/Convex/CylinderPairValueDerivative.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 47
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
.ctor(...)100%11100%

File(s)

/home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Geometry/Wide/Convex/CylinderPairValueDerivative.cs

#LineLine coverage
 1//=======================================================================
 2// CylinderPairValueDerivative.cs
 3//=======================================================================
 4// MIT License, Copyright (c) 2024-present David Oravsky (mrdav30)
 5// See LICENSE file in the project root for full license information.
 6//=======================================================================
 7
 8using System;
 9
 10namespace FixedMathSharp.Geometry;
 11
 12/// <summary>
 13/// Caller-owned storage for one exact directional derivative of the rim value
 14/// polynomial. The six input slots are rho', tau', (c²)', (c.u)', (c.w)',
 15/// and (b.c)'; axes and perpendicular basis vectors remain fixed.
 16/// </summary>
 17/// <remarks>
 18/// Each slot uses the value builder's word width and canonical signed-magnitude
 19/// encoding. Output has nine slots. All storage is disjoint from the value
 20/// construction and from each other. The default value disables derivatives;
 21/// a supplied six-slot zero direction is still evaluated and cleared exactly.
 22/// The derivative preserves the value polynomial's raw factor of three.
 23/// </remarks>
 24internal readonly ref struct CylinderPairValueDerivative
 25{
 26    internal const int InvariantCount = 6;
 27    internal const int ScratchCoefficientCount = 72;
 28
 29    internal readonly ReadOnlySpan<ulong> Invariants;
 30    internal readonly ReadOnlySpan<sbyte> InvariantSigns;
 31    internal readonly Span<ulong> Coefficients;
 32    internal readonly Span<sbyte> Signs;
 33    internal readonly Span<ulong> Scratch;
 34    internal readonly Span<sbyte> ScratchSigns;
 35
 36    internal CylinderPairValueDerivative(ReadOnlySpan<ulong> invariants,
 37        ReadOnlySpan<sbyte> invariantSigns, Span<ulong> coefficients,
 38        Span<sbyte> signs, Span<ulong> scratch, Span<sbyte> scratchSigns)
 39    {
 512840        Invariants = invariants;
 512841        InvariantSigns = invariantSigns;
 512842        Coefficients = coefficients;
 512843        Signs = signs;
 512844        Scratch = scratch;
 512845        ScratchSigns = scratchSigns;
 512846    }
 47}