1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-12-22 18:36:48 +02:00

test/floor: add two real-life-like rounding problems (mil to mm)

This commit is contained in:
Werner Almesberger 2012-05-26 20:10:26 -03:00
parent 9a6c7d2742
commit 91154440a3

View File

@ -19,4 +19,22 @@ expect <<EOF
-2
EOF
#------------------------------------------------------------------------------
fped "floor: round 7 mil (0.1778 mm) to two digits in mm" <<EOF
%print floor(7mil/0.01mm+0.5)*0.01mm
EOF
expect <<EOF
0.18mm
EOF
#------------------------------------------------------------------------------
fped "floor: round 12 mil (0.3048 mm) to two digits in mm" <<EOF
%print floor(12mil/0.01mm+0.5)*0.01mm
EOF
expect <<EOF
0.3mm
EOF
###############################################################################