< Summary

Class:GroundMovement
Assembly:bamlab.micromissiles
File(s):/github/workspace/Assets/Scripts/Movements/GroundMovement.cs
Covered lines:6
Uncovered lines:0
Coverable lines:6
Total lines:18
Line coverage:100% (6 of 6)
Covered branches:0
Total branches:0
Covered methods:2
Total methods:2
Method coverage:100% (2 of 2)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GroundMovement(...)0%110100%
Act(...)0%110100%

File(s)

/github/workspace/Assets/Scripts/Movements/GroundMovement.cs

#LineLine coverage
 1using UnityEngine;
 2
 3// Ground-based movement.
 4//
 5// The agent is confined to only move along the x-z plane.
 6public class GroundMovement : MovementBase {
 37  public GroundMovement(IAgent agent) : base(agent) {}
 8
 9  // Determine the agent's actual acceleration input given its intended acceleration input by
 10  // applying physics and other constraints. Ensure that the agent moves along the x-z plane and
 11  // ignore drag and gravity along the ground.
 112  public override Vector3 Act(in Vector3 accelerationInput) {
 13    // Ensure that there is no acceleration out of the x-z plane.
 114    Vector3 constrainedAccelerationInput = accelerationInput;
 115    constrainedAccelerationInput.y = 0;
 116    return LimitAccelerationInput(constrainedAccelerationInput);
 117  }
 18}