• Compares expected variables array to actual variables array from the simulation, using the given tolerance for the tests. If any number in the expected array is NaN then the test is not done for that entry. The length of the expected array can be less than the simulation's array. If a difference is found, test failure is reported with a message specifying which variable was out of tolerance.

    Parameters

    • sim: RigidBodySim

      the simulation to examine

    • expected: number[]

      the expected values

    • tolerance: number

      the amount of difference allowed before signalling an error

    Returns boolean

    true if expected results are found or expected results are null

    Throws

    if expected results are null, or tolerance is NaN

Generated using TypeDoc