cameo/fped2d2z.pl: hack: maintain decimal point across flipping

This commit is contained in:
Werner Almesberger 2014-02-02 02:33:42 -03:00
parent 0fc785d3a1
commit 453f64e4fe
1 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,8 @@ for $z (keys %z) {
undef $t;
for $s (split(/\n/, $z{$z})) {
if ($s =~ /^(-?[0-9]*\.[0-9]*)\s+(-?[0-9]*\.[0-9]*)/) {
$s = (($xmax+$xmin)/2-$1)." $2" if $flip_y;
$s = sprintf("%.6f", ($xmax+$xmin)/2-$1)." $2"
if $flip_y;
# re-scan, so that we can flip on both axes
die unless $s =~