Logo Search packages:      
Sourcecode: inkscape version File versions

static NR::Point sp_darray_right_tangent ( NR::Point const   d[],
unsigned const   len 
) [static]

Estimates the (backward) tangent at d[last - 0.5].

N.B. The tangent is "backwards", i.e. it is with respect to decreasing index rather than increasing index.

Precondition:
2 <= len.

d[len - 1] != d[len - 2].

all[p in d] in_svg_plane(p).

Definition at line 700 of file bezier-utils.cpp.

Referenced by generate_bezier(), and sp_darray_right_tangent().

{
    g_assert( 2 <= len );
    unsigned const last = len - 1;
    unsigned const prev = last - 1;
    g_assert( d[last] != d[prev] );
    return unit_vector( d[prev] - d[last] );
}


Generated by  Doxygen 1.6.0   Back to index