< Summary

Information
Class: FixedMathSharp.IBoundExtensions
Assembly: FixedMathSharp
File(s): /home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Bounds/IBoundExtensions.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 18
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
ProjectPointWithinBounds(...)100%11100%

File(s)

/home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Bounds/IBoundExtensions.cs

#LineLine coverage
 1using System.Runtime.CompilerServices;
 2
 3namespace FixedMathSharp
 4{
 5    internal static class IBoundExtensions
 6    {
 7        /// <inheritdoc cref="IBound.ProjectPoint(Vector3d)" />
 8        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 9        public static Vector3d ProjectPointWithinBounds(this IBound bounds, Vector3d point)
 710        {
 711            return new Vector3d(
 712                FixedMath.Clamp(point.x, bounds.Min.x, bounds.Max.x),
 713                FixedMath.Clamp(point.y, bounds.Min.y, bounds.Max.y),
 714                FixedMath.Clamp(point.z, bounds.Min.z, bounds.Max.z)
 715            );
 716        }
 17    }
 18}