This is MiscCylindricalCoord.m in view mode; [Download] [Up]
/*======================= MiscCylindricalCoord.m ============================*/
/* MiscCylindricalCoord class contains and supports values representing
locations in a Cylindrical coordinate system. Angles are stored internally
as radians at all times, but may be stored or retrieved as degrees.
DMA Release 0.8, Copyright @1993 by Genesis Project, Ltd. All Rights
Reserved. For further information on terms and conditions see:
Documentation/GISKit/Agreements-Legal-README
HISTORY
25-Feb-93 Dale Amon at GPL
Created.
*/
#import <misckit/miscgiskit.h>
@implementation MiscCylindricalCoord
/*===========================================================================*/
/* Coordinate handling methods */
/*===========================================================================*/
/* set Cylindrical Coord value from degrees */
-setCoordRadius: (double) r thetaDegrees: (double) theta z: (double) z
{ [self setCoord: r: [MiscCoord degreesToRadians: theta] :z];
return self;
}
/*---------------------------------------------------------------------------*/
/* set Cylindrical Coord value from radians */
-setCoordRadius: (double) r thetaRadians: (double) theta z: (double) z
{ [self setCoord: r : theta : z];
return self;
}
/*---------------------------------------------------------------------------*/
/* Get Cylindrical Coord value in degrees */
-coordRadius: (double*) r thetaDegrees: (double*) theta z: (double*) z
{ [self coord: r: theta :z];
*theta = [MiscCoord radiansToDegrees: *theta];
return self;
}
/*---------------------------------------------------------------------------*/
/* Get Cylindrical Coord value in radians */
-coordRadius: (double*) r thetaRadians: (double*) theta z: (double*) z
{ [self coord: r : theta : z];
return self;
}
/*---------------------------------------------------------------------------*/
/* Cylindrical coordinates are: r,theta and z */
-(double) radius {return [self coord1];}
-(double) thetaRadians {return [self coord2];}
-(double) thetaDegrees {return [MiscCoord radiansToDegrees: [self coord2]];}
-(double) zCoord {return [self coord3];}
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.