ocmath_curve_length

 

Description

This function computes curve's length.

Syntax

int ocmath_curve_length( UINT nSize, const double * pX, const double * pY, double * pLen )

Parameters

nSize
[input] size of input curve's X and Y value array.
pX
[input] pointer to curve's X value array.
pY
[input] pointer to curve's Y value array.
pLen
[output] pointer to curve's length.

Return

Return OE_NOERROR if succeed, otherwise, non-zero error code is returned.

Examples

EX1

void ocmath_curve_length_ex1()
{
    vector vX = {0.1, 0.4, 0.7};
    vector vY = {0.2, 0.6, 1.0};
    double dLen;
    int nRet = ocmath_curve_length(vX.GetSize(), vX, vY, &dLen);
}
// At the end of example: dLen = 1;

Remark

See Also

header to Include

origin.h

Reference