home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
IDIOMS.ZIP
/
2ANGLE.H
< prev
next >
Wrap
C/C++ Source or Header
|
1991-12-04
|
407b
|
22 lines
/* Copyright (c) 1992 by AT&T Bell Laboratories. */
/* Advanced C++ Programming Styles and Idioms */
/* James O. Coplien */
/* All rights reserved. */
#include <math.h>
#include <stdio.h>
extern const double pi;
class Angle {
public:
Angle(double degrees) {
r = degrees * pi / 180.0;
}
void print() {
printf("radians = %f\n", r);
}
private:
double r;
};