Class LambdaSim

Function object that uses the user-defined lambda function to simulate the Universe.

Implements

Constructors

Properties

Methods

Constructors

  • Create a new LambdaSim with the provided lambda function.

    • The lambda function should take in the time step, the current state of the Universe, and the previous state of the Universe, and return the next state of the Universe.
    • The lambda function should call or calculate the forces action on the bodies by itself.

    Parameters

    • fn: ((deltaT, currState, prevState) => State)

      lambda function.

        • (deltaT, currState, prevState): State
        • Parameters

          Returns State

    Returns LambdaSim

Properties

fn: ((deltaT, currState, prevState) => State)

Type declaration

    • (deltaT, currState, prevState): State
    • Parameters

      Returns State

Methods

Generated using TypeDoc