[ Home | About | Tech Info & Data | Publications | References ] [ Site by Jeffrey Hall | Research funded by NSF ]
The Coord class implements defintion of and operations on an x-y coordinate. Two Coord objects are used to define the corners of a rectangle in the Rect class, and many of that class's methods call methods of this class. Since Obj_Destroy by itself will take care of destroying this object, it does not define its own Cleanup method.
2008 July 17 - Documentation written.
float x
float y
Structure definition. Specifies the contents of the IDL structure instantiated by the Coord class. Used by Obj_New; do not invoke directly.
argument variant vals
Return float[2] diff
Returns the difference between two coordinates as a two-element float. The x and y values given by the arguments are subtracted from the values of the object's data members and the difference returned. This method can also accept an object as an argument. If an object is passed, the method expects that it has a get method that will return a coordinate for comparison.
argument variant vals
Return bool TRUE, FALSE
Returns TRUE is the x and y values in the arguments are the same as those in the Coord object, and FALSE otherwise. This method can also accept an object as an argument. If an object is passed, the method expects that it has a get method that will return a coordinate for comparison.
Return float[ 2 ] [x, y]
Returns the object's data members as a two-element float.
argument float x
argument float y
Return bool TRUE
Constructor. The arguments specify the coordinate's x and y values. Never call this function directly; it is invoked by IDL's Obj_New function.
Return float mag
Returns the magnitude of the coordinate (i.e., the length of a vector between it and the origin).
argument float[2] set
Sets the values of the object's data members.
obj = Obj_New( 'Coord', 6.0, 8.0 )
Obj_Destroy( obj )