< Summary

Information
Class: GridForge.Grids.GridTraceAddressCandidate
Assembly: GridForge
File(s): /home/runner/work/GridForge/GridForge/src/GridForge/Grids/Support/GridTraceAddressCandidate.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 27
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%
WithPhysicalPresence(...)100%11100%

File(s)

/home/runner/work/GridForge/GridForge/src/GridForge/Grids/Support/GridTraceAddressCandidate.cs

#LineLine coverage
 1//=======================================================================
 2// GridTraceAddressCandidate.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 GridForge.Spatial;
 9
 10namespace GridForge.Grids;
 11
 12internal readonly struct GridTraceAddressCandidate
 13{
 14    public readonly VoxelGrid Grid;
 15    public readonly VoxelIndex Index;
 16    public readonly bool IsPhysicallyPresent;
 17
 18    public GridTraceAddressCandidate(VoxelGrid grid, VoxelIndex index, bool isPhysicallyPresent)
 19    {
 336320        Grid = grid;
 336321        Index = index;
 336322        IsPhysicallyPresent = isPhysicallyPresent;
 336323    }
 24
 25    public GridTraceAddressCandidate WithPhysicalPresence(bool isPhysicallyPresent) =>
 80826        new GridTraceAddressCandidate(Grid, Index, isPhysicallyPresent);
 27}