< Summary

Information
Class: Gravitas.Queries.PhysicsQueryHitRange
Assembly: Gravitas
File(s): /home/runner/work/Gravitas/Gravitas/src/Gravitas/Queries/Common/PhysicsQueryHitRange.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 43
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%
get_End()100%11100%
get_HasHits()100%11100%

File(s)

/home/runner/work/Gravitas/Gravitas/src/Gravitas/Queries/Common/PhysicsQueryHitRange.cs

#LineLine coverage
 1//=======================================================================
 2// PhysicsQueryHitRange.cs
 3//=======================================================================
 4// MIT License, Copyright (c) 2026-present David Oravsky (mrdav30)
 5// See LICENSE file in the project root for full license information.
 6//=======================================================================
 7
 8namespace Gravitas.Queries;
 9
 10/// <summary>
 11/// Identifies the contiguous hits produced by one request inside a shared batch hit buffer.
 12/// </summary>
 13public readonly struct PhysicsQueryHitRange
 14{
 15    /// <summary>
 16    /// Creates a range within a shared batch hit buffer.
 17    /// </summary>
 18    public PhysicsQueryHitRange(int start, int count)
 19    {
 234620        Start = start;
 234621        Count = count;
 234622    }
 23
 24    /// <summary>
 25    /// Gets the first hit index in the shared hit buffer.
 26    /// </summary>
 27    public int Start { get; }
 28
 29    /// <summary>
 30    /// Gets the number of hits written for the request.
 31    /// </summary>
 32    public int Count { get; }
 33
 34    /// <summary>
 35    /// Gets the exclusive end index in the shared hit buffer.
 36    /// </summary>
 237    public int End => Start + Count;
 38
 39    /// <summary>
 40    /// Gets whether the request produced at least one hit.
 41    /// </summary>
 242    public bool HasHits => Count > 0;
 43}