NeoYang 發表於 2007-4-23 15:59:25

IsAngleBetweenAngles

function IsAngleBetweenAngles takes real Match, real Max, real Min returns boolean
    set Match = ModuloReal(Match,360.0)
    loop
      exitwhen Match >= Min
      set Min = Min - 360.0
    endloop
    loop
      exitwhen Max > Min
      set Max = Max + 360.0
    endloop
    loop
      exitwhen (Max-Min) < 360.0
      set Max = Max - 360.0
    endloop

    return (Max>=Match)
endfunction

轉貼自http://www.wc3jass.com/
 
頁: [1]
查看完整版本: IsAngleBetweenAngles

Checking the Pageranks