1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2024-12-22 23:51:08 +02:00

cameo/zstack.pl: use the entire number for (x, y, z0)

This commit is contained in:
Werner Almesberger 2013-11-07 04:55:57 -03:00
parent d64a34045f
commit ff5b4a1ae8

View File

@ -54,10 +54,10 @@ while (<>) {
$z{$z} .= "$s\n"; $z{$z} .= "$s\n";
undef $s; undef $s;
} }
if (/^-?\d+(\.\d*)?\s+-?\d+(\.\d*)?\s+(-?\d+(\.\d*)?)/) { if (/^(-?\d+(\.\d*)?)\s+(-?\d+(\.\d*)?)\s+(-?\d+(\.\d*)?)/) {
$x = $1 unless defined $x; $x = $1 unless defined $x;
$y = $2 unless defined $y; $y = $3 unless defined $y;
$z = $3; $z = $5;
} }
$s .= $_; $s .= $_;
$zmax = $z if $z > $zmax || !defined $zmax; $zmax = $z if $z > $zmax || !defined $zmax;