Class LambdaForce

Function object that uses the user-defined lambda function to calculate the forces acting on the bodies.

Implements

Constructors

Properties

Methods

Constructors

  • Create a new LambdaForce with the provided lambda function.

    • Lambda function should take in an array of CelestialBodies and return an array of forces acting on the bodies.
    • arr[i] should represent the force acting on the ith body.
    • Length of the returned array should be equal to the length of the input array of CelestialBodies.

    Parameters

    Returns LambdaForce

Properties

fn: ((bodies) => Vector3[])

Lambda function to calculate forces, provided by the user.

Type declaration

Methods

Generated using TypeDoc