Description Sets the length of a three dimensional vector.
Syntax SetLength3D x, y, z, length
Parameters x As Double On input: the original value of the X component. On Output: the new value of the X component of the vector.
y As Double On input: the original value of the Y component. On Output: the new value of the Y component of the vector.
z As Double On input: the original value of the Z component. On Output: the new value of the Z component of the vector.
length As Double The desired length of the vector, used to calculate x, y, and z.
Remarks This subroutine sets the length of a vector. If there is a problem, the subroutine does not set an error but does return 0.
On input (x,y,z) is the original vector. On output the values (x,y,z) are scaled so that the vector has the length specified by length. The direction of the vector is not changed, only its length.
See Also Examples
|