Root/test/floor

1#!/bin/sh
2. ./Common
3
4###############################################################################
5
6fped "floor: 4.7mm" <<EOF
7%print floor(4.7mm)
8EOF
9expect <<EOF
104mm
11EOF
12
13#------------------------------------------------------------------------------
14
15fped "floor: -1.2m" <<EOF
16%print floor(-1.2)
17EOF
18expect <<EOF
19-2
20EOF
21
22#------------------------------------------------------------------------------
23
24fped "floor: round 7 mil (0.1778 mm) to two digits in mm" <<EOF
25%print floor(7mil/0.01mm+0.5)*0.01mm
26EOF
27expect <<EOF
280.18mm
29EOF
30
31#------------------------------------------------------------------------------
32
33fped "floor: round 12 mil (0.3048 mm) to two digits in mm" <<EOF
34%print floor(12mil/0.01mm+0.5)*0.01mm
35EOF
36expect <<EOF
370.3mm
38EOF
39
40###############################################################################
41

Archive Download this file

Branches:
master



interactive