2012-05-26 20:13:58 +03:00
|
|
|
#!/bin/sh
|
|
|
|
. ./Common
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
fped "floor: 4.7mm" <<EOF
|
|
|
|
%print floor(4.7mm)
|
|
|
|
EOF
|
|
|
|
expect <<EOF
|
|
|
|
4mm
|
|
|
|
EOF
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
fped "floor: -1.2m" <<EOF
|
|
|
|
%print floor(-1.2)
|
|
|
|
EOF
|
|
|
|
expect <<EOF
|
|
|
|
-2
|
|
|
|
EOF
|
|
|
|
|
2012-05-27 02:10:26 +03:00
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2012-05-26 20:13:58 +03:00
|
|
|
###############################################################################
|