From 453f64e4fe4e3ea491194047453042b6d1fd9c38 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sun, 2 Feb 2014 02:33:42 -0300 Subject: [PATCH] cameo/fped2d2z.pl: hack: maintain decimal point across flipping --- cameo/fped2d2z.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cameo/fped2d2z.pl b/cameo/fped2d2z.pl index 6e45f29..932f8e3 100755 --- a/cameo/fped2d2z.pl +++ b/cameo/fped2d2z.pl @@ -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 =~