[system] / trunk / pg / macros / parserParametricLine.pl Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# Diff of /trunk/pg/macros/parserParametricLine.pl

Revision 2934 Revision 3195
96# points or the vector between the points is 96# points or the vector between the points is
97# parallel to the (common) direction vector. 97# parallel to the (common) direction vector.
98# 98#
99sub compare { 99sub compare {
100 my (\$l,\$r,\$flag) = @_; 100 my (\$l,\$r,\$flag) = @_;
101 if (\$l->promotePrecedence(\$r)) {return \$r->compare(\$l,!\$flag)}
101 \$r = ParametricLine->new(\$r); 102 \$r = ParametricLine->new(\$r);
102 if (\$flag) {my \$tmp = \$l; \$l = \$r; \$r = \$tmp} 103 if (\$flag) {my \$tmp = \$l; \$l = \$r; \$r = \$tmp}
103 my (\$lp,\$lv) = (\$l->{p},\$l->{v}); 104 my (\$lp,\$lv) = (\$l->{p},\$l->{v});
104 my (\$rp,\$rv) = (\$r->{p},\$r->{v}); 105 my (\$rp,\$rv) = (\$r->{p},\$r->{v});
105 return \$lv <=> \$rv unless (\$lv->isParallel(\$rv)); 106 return \$lv <=> \$rv unless (\$lv->isParallel(\$rv));

Legend:
 Removed from v.2934 changed lines Added in v.3195