Difference between revisions of "Trigonometry Functions"

Jump to navigation Jump to search
1 byte removed ,  12:01, 9 May 2006
m
imported>Bifmadeinsabbioni
imported>JOG
Line 105: Line 105:
   
   
  Begin {appropriate blocktype}
  Begin {appropriate blocktype}
   set angle to player.getangle z
   set angle to player.getangle z
   if angle < -180
   set angle to angle + 360 * (angle < -180)  ; Normalize to +/- 180°
    set angle to angle + 360
  set angle to angle - 360 * (angle > 180)
  elseif angle > 180
    set angle to angle - 360
  endif
   set t1 to angle / 57.29577951    ; precalculate powers of "angle"
   set t1 to angle / 57.29577951    ; precalculate powers of "angle"
   set t2 to t1*t1  
   set t2 to t1*t1
   set t5 to t2*t2*t1
   set t5 to t2*t2*t1
   set t6 to t5*t1
   set t6 to t5*t1
Line 121: Line 116:
   set tana to sina/cosa
   set tana to sina/cosa
  end
  end


== Taylor Series Variant 3 ==  
== Taylor Series Variant 3 ==  
Anonymous user

Navigation menu