I know SOH CAH TOA.

after going through some problems i think i have a forumla down and then the next problem throws a whole different formula at you. I tried to make a program to give you the answer. But the forumla changes on the fly and i dont know why?

some figure shows the side between theta and right angle is ALWAYS adjacent whereas another figure shows the opposite, displaying adjacent between the known angle and right triangle. Sometimes you convert the angle to radians and sometimes you do not. Sometimes you divide the trig funtion by the known side and sometimes you multiply the the trig function by the known side. There seems to be no set in stone rules, which makes me frustrated.

Each web site is the same too, ill get a few problems right, and then one problem the formula will be different and get itt wrong, and as i look through how they got the answer i jsut keep asking myself why did they do it like that this time when they did not do it like that the other time.

EDIT:

this is all regarding just right triangles by the way.

EDIT2:

For those of you that do program 2d games. How intense does the trig get in 2d games? I know you need basic for turning turrets towarrds the players position, or firing towards a player for example. But how much farther does it go?

EDIT3:

i put this specifically in game development as opposed to bar as it seemed more appropriate for future help pygamers.

EDIT4:

the school, after you give 3 wrong answers, just gives the answer, so we get this answer back and have no idea how they got that number to begin with so, i made this code to try to quicken the process on how they got the number. (that should describe how many times we input wrong answers, ew). I wrote it in C++ though.

- Code: Select all
`#include <iostream>`

#include <cmath>

//SOH COH TOA

double to_radians(double degrees){

return degrees * 3.141592653589793 / 180.0;

}

void len(double degrees, double side){

double t, c, s, t2, c2, s2;

t = tan(to_radians(degrees)) * side;

t2 = side / tan(to_radians(degrees));

c = cos(to_radians(degrees)) * side;

c2 = side / cos(to_radians(degrees));

s = sin(to_radians(degrees)) * side;

s2 = side / sin(to_radians(degrees));

std::cout << "side: " << t << " = tan(" << to_radians(degrees) << ") * " << side << std::endl;

std::cout << "side: " << t2 << " = " << side << " / tan(" << to_radians(degrees) << ")" << std::endl;

std::cout << std::endl;

std::cout << "side: " << c << " = cos(" << to_radians(degrees) << ") * " << side << std::endl;

std::cout << "side: " << c2 << " = " << side << " / cos(" << to_radians(degrees) << ")" << std::endl;

std::cout << std::endl;

std::cout << "side: " << s << " = sin(" << to_radians(degrees) << ") * " << side << std::endl;

std::cout << "side: " << s2 << " = " << side << " / sin(" << to_radians(degrees) << ")" << std::endl;

}

int main(){

len(15,21);

}