Synopsis

PDX_MSGT gdx_GetCurveCurvature(long option, double (*derivs)[3], double *curvature)

Purpose

Calculate the GDX curve curvature values

Description

Given the curve 0th thru 2nd derivatives calculates the curve curvature. If first derivative has 0 magnitude and second derivative has non-0 magnitude, the curvature value is set to infinity (DBL_MAX). Otherwise, if both first and second derivative have 0 magnitude, the curvature is set to 0.

Input

option

Options (Not used)

derivs

The curve derivatives at the desired S value

Output

curvature

The curve curvature

Tolerances

ZERO_TOL

Return

GDX_NOERR