pub fn optimize_v2<T: MyFloat>(
initial: &PhysicsStateV3<T>,
curve: &Spline<T>,
points: &mut [Point<T>],
lr: Fpt,
) -> Option<Fpt>Expand description
Performs one step of GD to minimize the cost of the curve (gradients calculated using secant approximation)
Returns: the original cost, or None if this calculation failed
initial: starting physics statecurve: The Hermite spline to optimizepoints: Array of control points for the splinelr: Determines the step size for gradient descent