Archived

This topic is now archived and is closed to further replies.

glPerfect

Function

Recommended Posts

Guest Anonymous Poster
Just about everyone should know that 1 radian = 180/PI degrees

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
  
#include <math.h>


#define DEG2RAD(x) ((x) * M_PI / 180.0)
#define RAD2DEG(x) ((x) * 180.0 / M_PI)

double x = 60; // degrees

double y = 0;
double z = 0;

y = cos(DEG2RAD(x));
z = RAD2DEG(acos(y));

Share this post


Link to post
Share on other sites