2012

Table Of Contents
Numeric functions
DescriptionFunction
Square root of the number; the number must be nonnegativesqrt(real)
Absolute value of the numberabs(real)
Number rounded to the nearest integerround(real)
Integer portion of the numbertrunc(real)
Angles in radians converted to degrees; for example, r2d(pi) converts
the pi radians to 180 degrees
r2d(angle)
Angles in degrees converted to radians; for example, d2r(180) con-
verts 180 degrees to radians and returns the value of pi
d2r(angle)
The constant pipi
See also:
Use the Command Line Calculator
Calculate a Vector from Two Points
The functions vec and vec1 calculate a vector from two points.
vec(p1,p2) Provides the vector from point p1 to point p2.
vec1(p1,p2) Provides the unit vector from point p1 to point p2.
The following example uses CAL to move selected objects 3 units in the
direction from the center of one selected circle to the center of another selected
circle:
Command: move
Select objects
Specify base point or displacement: 'cal
>> Expression: 3*vec1(cen,cen)
Select entity for CEN snap: Specify a circle or an arc
Commands | 169