< Summary

Information
Class: Gravitas.Constraints.JointFrame2D
Assembly: Gravitas
File(s): /home/runner/work/Gravitas/Gravitas/src/Gravitas/Constraints/2D/JointFrame2D.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 40
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_Identity()100%11100%

File(s)

/home/runner/work/Gravitas/Gravitas/src/Gravitas/Constraints/2D/JointFrame2D.cs

#LineLine coverage
 1//=======================================================================
 2// JointFrame2D.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 FixedMathSharp;
 9
 10namespace Gravitas.Constraints;
 11
 12/// <summary>
 13/// Immutable local anchor frame used by a pure 2D joint.
 14/// </summary>
 15public readonly struct JointFrame2D
 16{
 17    /// <summary>
 18    /// Creates a local planar joint frame.
 19    /// </summary>
 20    public JointFrame2D(Vector2d anchor, Fixed64 angle)
 21    {
 6022        Anchor = anchor;
 6023        Angle = angle;
 6024    }
 25
 26    /// <summary>
 27    /// Gets the body-local anchor point in the X/Z simulation plane.
 28    /// </summary>
 29    public Vector2d Anchor { get; }
 30
 31    /// <summary>
 32    /// Gets the body-local scalar frame angle in radians.
 33    /// </summary>
 34    public Fixed64 Angle { get; }
 35
 36    /// <summary>
 37    /// Gets the identity local frame.
 38    /// </summary>
 36639    public static JointFrame2D Identity => default;
 40}