Thread: [Include] 3DTryg Functions
View Single Post
Old 09/10/2015, 04:38 PM   #19
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,212
Reputation: 352
Default Re: Get Point In Front 2D 3D

Quote:
Originally Posted by Crayder View Post
Your code is wrong, a single addition/subtraction will not work. For example, 730 in your code would return 370. My while loops will return 10.

If a test froze your server it is all on your end, it works perfectly fine for me.

accidentally I made a mistake in my alternative
PHP Code:
stock CompRotation(rotation,&cr){ 
    
cr rotation
    while(
cr 0.0cr += 360.0;        //shit
    
while(cr >= 360.0cr -= 360.0;    //shit

The loop works
PHP Code:
stock CompRotation(rotation,&cr){ 
    
cr rotation
    while(
cr 0cr += 360
    while(
cr >= 360cr -= 360
}

stock CompRotationFloat(Float:rotation,&Float:cr){ 
    
cr rotation
    while(
cr 0.0cr += 360.0
    while(
cr >= 360.0cr -= 360.0

AbyssMorgan is offline   Reply With Quote