
-----------------------------------
Homer_simpson
Tue Jul 08, 2003 8:48 pm

C++ Function crash
-----------------------------------
can some1 tell me why this function crashes?
float cosd(float x){
	return cos((3.141592653*x)/180);
}
float sind(float x){
	return sind((3.141592653*x)/180);
}

void rotate (float OriginX,float OriginY, float &secondpartX,float &secondpartY,float Rotaion){
    float tempx = (((OriginX - secondpartX) * cosd (Rotaion)) + ((OriginY - secondpartY) * sind (Rotaion)));
    float tempy = (((OriginY - secondpartY) * cosd (Rotaion)) - ((OriginX - secondpartX) * sind (Rotaion)));
    secondpartY = OriginY - tempy;
    secondpartX = OriginX - tempx;
}

-----------------------------------
Catalyst
Tue Jul 08, 2003 9:06 pm

Re: C++ Function crash
-----------------------------------
can some1 tell me why this function crashes?

	return sind((3.141592653*x)/180);


should be sin

-----------------------------------
Homer_simpson
Tue Jul 08, 2003 9:41 pm


-----------------------------------
oh yeah... oops :oops: 
stupid C++ can be really confusing sometimes... :P 
thx for the help catalyst...  :D
