1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-11-22 14:08:28 +02:00
fped/test/floor

41 lines
829 B
Bash
Executable File

#!/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
#------------------------------------------------------------------------------
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
###############################################################################