solved .. deg_to_rad((x-y));
eg. phi=deg_to_rad((90 - lat1));
double brackets are needed for the math arithemtic to work
so if any students are doing this question as well... this is the...
Type: Posts; User: tantan23434
solved .. deg_to_rad((x-y));
eg. phi=deg_to_rad((90 - lat1));
double brackets are needed for the math arithemtic to work
so if any students are doing this question as well... this is the...
double angle(double x1, double y1, double z1, double x2, double y2, double z2) {
double dot, dist1, dist2;
dot = (x1 * x2) + (y1 * y2) + (z1 * z2); // find the dot product of the two vectors...
#include <stdio.h>
#include <math.h>
#define PI 3.141593
//// macro (used in earlier tutorial), suitable for one liner function
#define deg_to_rad(deg) (deg * (PI/180.0))
//// function...