finding the angle >.<

hi, i want 2 calculate the angle pettween 3 potential sides by this formula


fabs( (slope2-slope1)/(1 + slope11*slope2)) ;

so , what i want is the angle .that's why i must use the tan inverse
i found in my book that tan inverse is written as (tanh(x)
but the answer would'nt show what to do .

do u need my program?.
Last edited on
yes
Ummm ... i suck at English terms for math functions, but i know that tanh(x) calculates the hyperbolic tangent for x. And inversing tangent, I see as 1/tan(x). Or am I in the dark here?
atan() is the arctangent. 1/tan() is the cotangent.
Try this example for tanh(x)


#include <math.h>
#include <stdio.h>

int main(void)
{
double pi, x;

pi = 3.1415926;
x = tanh(pi/4);

printf("tanh( %lf ) = %lf\n", pi/4, x);
}



Regards
Vinay Kumar A S
I thought that the tan inverse was the atan()
It is.
Topic archived. No new replies allowed.