Logo Search packages:      
Sourcecode: inkscape version File versions

Coord Geom::L1 ( Point const &  p  ) 

Compute the L1 norm, or manhattan distance, of p.

Definition at line 62 of file point.cpp.

References L1().

Referenced by intersect_polish_root(), and L1().

                         {
    Coord d = 0;
    for ( int i = 0 ; i < 2 ; i++ ) {
        d += fabs(p[i]);
    }
    return d;
}


Generated by  Doxygen 1.6.0   Back to index