mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-18 12:32:48 +02:00
test/floor: add two real-life-like rounding problems (mil to mm)
This commit is contained in:
parent
9a6c7d2742
commit
91154440a3
18
test/floor
18
test/floor
@ -19,4 +19,22 @@ expect <<EOF
|
|||||||
-2
|
-2
|
||||||
EOF
|
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
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user