< Summary

Information
Class: FixedMathSharp.Geometry.ConeSurfaceFamilySelection
Assembly: FixedMathSharp
File(s): /home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Geometry/Wide/FiniteAxis/ConeSurfaceFamilySelection.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 25
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Item(...)100%11100%
.ctor(...)100%11100%
Add(...)100%22100%

File(s)

/home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Geometry/Wide/FiniteAxis/ConeSurfaceFamilySelection.cs

#LineLine coverage
 1//=======================================================================
 2// ConeSurfaceFamilySelection.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;
 9using static FixedMathSharp.Geometry.ContactQuadratic;
 10
 11namespace FixedMathSharp.Geometry;
 12
 13/// <summary>Caller-owned finite pool of already admitted exact family events.</summary>
 14internal ref struct ConeSurfaceFamilySelection
 15{
 16    private readonly Span<ConeSurfaceFamilyEvent> events;
 17    internal int Count { get; private set; }
 38818    internal ConeSurfaceFamilyEvent this[int index] => events[..Count][index];
 78319    internal ConeSurfaceFamilySelection(Span<ConeSurfaceFamilyEvent> events) { this.events = events; Count = 0; }
 20    internal void Add(ConeSurfaceFamilyEvent item)
 21    {
 54722        if (Count == events.Length) throw new InvalidOperationException("The caller-owned family event storage is full."
 54523        events[Count++] = item;
 54524    }
 25}