< Summary

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

File(s)

/home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Geometry/Wide/Common/PlanarProjectionRelation.cs

#LineLine coverage
 1//=======================================================================
 2// PlanarProjectionRelation.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
 8namespace FixedMathSharp.Geometry;
 9
 10/// <summary>
 11/// Retains the representable distance and offset from a planar query point to
 12/// an exact projected solid.
 13/// </summary>
 14internal readonly struct PlanarProjectionRelation
 15{
 116    internal static readonly PlanarProjectionRelation Contained =
 117        new(
 118            Fixed64.Zero,
 119            Vector2d.Zero,
 120            Vector2d.Zero,
 121            isContained: true);
 22
 23    internal PlanarProjectionRelation(
 24        Fixed64 distance,
 25        Vector2d offset,
 26        Vector2d direction)
 3027        : this(distance, offset, direction, isContained: false)
 28    {
 3029    }
 30
 31    private PlanarProjectionRelation(
 32        Fixed64 distance,
 33        Vector2d offset,
 34        Vector2d direction,
 35        bool isContained)
 36    {
 3137        Distance = distance;
 3138        Offset = offset;
 3139        Direction = direction;
 3140        IsContained = isContained;
 3141    }
 42
 43    internal Fixed64 Distance { get; }
 44
 45    internal Vector2d Offset { get; }
 46
 47    internal Vector2d Direction { get; }
 48
 49    internal bool IsContained { get; }
 50}