Logo Search packages:      
Sourcecode: inkscape version File versions

double unclump_average ( SPItem item,
GSList *  others 
)

Average unclump_dist from item to others

Definition at line 165 of file unclump.cpp.

References unclump_dist().

{
    int n = 0;
    double sum = 0;

    for (GSList *i = others; i != NULL; i = i->next) {
        SPItem *other = SP_ITEM (i->data);

        if (other == item)
            continue;

        n++;
        sum += unclump_dist (item, other);
    }

    if (n != 0)
        return sum/n;
    else
        return 0;
}


Generated by  Doxygen 1.6.0   Back to index