Search:

Type: Posts; User: tantan23434

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    1,572

    solved .. deg_to_rad((x-y)); eg....

    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...
  2. Replies
    3
    Views
    1,572

    no difference in the result ... is still not 2886

    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...
  3. Replies
    3
    Views
    1,572

    wad wrong with this code?

    #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...
Results 1 to 3 of 3