Numbers
A number: whole, decimal, a fraction, or feet and inches.
Syntax
12
12.5
.5
1/4
2 1/4
2-1/4
3'
3'6"
3'6 1/2"
6"
Result
A number. Fractions and feet-and-inches are kept exact until they are used with decimals.
Examples
In the example drawing:
| Expression | Gives |
|---|---|
12.5 |
12.5 |
2 1/4 |
2 1/4 |
2-1/4 |
2 1/4 |
2 - 1/4 |
1 3/4 |
1/4+0.5 |
0.75 |
1/4+1/8 |
3/8 |
1/4*4 |
1 |
3'6" |
3'6" |
2*1'6" |
3' |
3'/6" |
6 |
DOUBLE(3'6") |
1066.8 |
Notes
A minus sign in front makes a number negative: -2.5, -1/4. A whole number, a dash and a fraction is one mixed number: 2-1/4 is 2¼; to subtract, put spaces round the minus: 2 - 1/4 is 1¾. Fractions with fractions and whole numbers stay exact (1/4+1/8 is 3/8, 2 - 1/4 is 1¾), and so do the functions that can keep them so: ABS, SIGN, SQR, MIN, MAX, CLAMP, ROUND, FLOOR, CEIL, TRUNC, %, POW to a whole power, SQRT when the root is exact, LERP, INVERSELERP and REMAP by a fraction, and a FOR loop's steps. With a decimal, they become one. Feet and inches stay feet and inches with feet and inches, times or divided by a whole number or a fraction (2*1'6" is 3'), and in ABS, MIN, MAX, CLAMP, %, LERP and REMAP; ROUND, FLOOR, CEIL and TRUNC make them whole inches. Feet and inches divided by feet and inches is a fraction, and so is INVERSELERP of them. Otherwise they become the drawing's units: in a millimetre drawing, 3'6" is 1066.8, and 1'+1/2 is 305.3; in a drawing in inches, a plain number is inches, so 1'+1/2 is 1' ½". Functions that need an ordinary number (SIN, LOG, DOUBLE, INT …) take them as one, in the drawing's units. To change between inches and millimetres, use TOMM and TOIN.