File: floor

package info (click to toggle)
fped 0.1%2B201210-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 948 kB
  • ctags: 1,663
  • sloc: ansic: 12,650; yacc: 1,112; sh: 974; lex: 204; makefile: 140; awk: 75
file content (40 lines) | stat: -rwxr-xr-x 829 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/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

###############################################################################