To-pair - Function Summary
Summary:
(missing)
Usage:
to-pair value
Arguments:
value - The value argument.
Description:
Converts a value to a pair datatype.
print to-pair [120 50]
120x50 |
x: 100
y: 80
print to-pair reduce [x y]
100x80 |
This last line is done so often that the AS-PAIR function was
created.
If you are performing a lot of xy pair math, you can also take a
performance advantage of standard math operations on pairs:
print 100X100 + 0x200
100x300 |
print 100x200 - 50
50x150 |
offset: 100x100 ; upper left corner
size: 300x500 ; object xy size
print offset + size ; the lower right corner
400x600 |
Related:
as-pair - Combine X and Y values into a pair. to - Constructs and returns a new value after conversion.
|