Usage:
Description:
The function get returns the current value of the ith ordinate. The value of i must be 0, 1, or 2.Return Value:
A double.Example:
#include <gamma.h>
main()
{
coord pt(5,6,7); // Define a coordinate point.
double y = pt.get(1); // Set y to the value 6.
}
See Also: x, y, z
Usage:
Description:
The functions x, y, and z are used to either obtain or set the first individual ordinates of a coordinate point. If no argument is given the function will return the requested ordinate whereas if a value is specified the oridinate will be set to that value. Although labeled x, y, and z these deal with the 1st, 2nd, and 3rd ordinates respectively (and only x,y, & z in a Cartesian system).Return Value:
A double precision number is returned.Examples:
#include <gamma.h>
main()
{
coord pt(1,-3,7); // Construct coordinate pt {1, -3, 7}.
cout << pt.x(); // Write the first ordinate of pt, 1, to standard output.
pt.x(3); // Set the first ordinate of pt to 3: {3,-3,7}.
double tmp = 3 * pt.y(); // Set variable tmp to 3*-3, where -3 is 2nd ordinate.
pt.y(1); // Set the second ordinate of pt to 1: {3, 1, 7}.
double tmp = 5 + pt.z(); // Set temp to 5+7, 7 being the 3rd ordinate of pt
pt.z(-1); // Set the 3rd ordinate of pt to -1: {3, 1, -1}
}
See Also: get, xyz
Usage:
Description:
The function xyz sets the values of the three ordinates of a coordinate point.coord.xyz(double u1, double u2, double u3) - sets the ordinates to u1, u2, and u3 respectively.
coord.xyz(coord &pt) - sets the components of the coordinate equal to those of coordinate pt.
Return Value:
None, the function is void.Examples:
#include <gamma.h>
main()
{
coord pt, pt1; // Create two empty points, pt and pt1.
pt.xyz(-11,0,7); // Set pt coordinates {-11, 0, 7}.
pt1.xyz(pt); // Set pt1 coordinates equal to those of pt {-11, 0, 7}.
}
See Also: x, y, z, coord, =
|
GAMMA Support Provided by the National High Magnetic Field Laboratory
© 1996 Scott A. Smith, The NHMFL, and The Florida State University. All Rights Reserved. |