< Summary

Information
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 36
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%
CreateKey(...)100%11100%

File(s)

/home/runner/work/Gravitas/Gravitas/src/Gravitas/CollisionHandling/Pairs/Mixed/MixedColliderKey.cs

#LineLine coverage
 1//=======================================================================
 2// MixedColliderKey.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
 8using System.Runtime.CompilerServices;
 9
 10namespace Gravitas;
 11
 12/// <summary>
 13/// Stable mixed-dimension broad-phase identity for one 3D collider and one 2D collider.
 14/// </summary>
 15internal readonly struct MixedColliderKey
 16{
 17    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 18    public MixedColliderKey(int collider3DId, int collider2DId)
 19    {
 18820        SwiftThrowHelper.ThrowIfNegative(collider3DId, nameof(collider3DId));
 18821        SwiftThrowHelper.ThrowIfNegative(collider2DId, nameof(collider2DId));
 18822        Collider3DId = collider3DId;
 18823        Collider2DId = collider2DId;
 18824        Key = CreateKey(collider3DId, collider2DId);
 18825    }
 26
 27    public int Collider3DId { get; }
 28
 29    public int Collider2DId { get; }
 30
 31    public ulong Key { get; }
 32
 33    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 34    public static ulong CreateKey(int collider3DId, int collider2DId) =>
 459735        ((ulong)(uint)collider3DId << 32) | (uint)collider2DId;
 36}