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

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

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 =~