Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Help
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 23.04.2006, 16:05   #8
Xelat
Архивный участник
 
Join Date: Apr 2006
Posts: 70
Default

Quote:
Originally Posted by humordwarf
Quote:
Originally Posted by Xelat
About math functions, I already find some functions:
% mod
| bit or
& bit and

and so....
server not have a sqrt function or operator...
~ not

lol, you really need sqrt in AI ?
- sqrt for integer values using common operands:
Code:
unsigned sqrt_newton(long l)
{
      long temp, div = l;
      unsigned rslt = (unsigned)l;
      if (l <= 0)
            return 0;
      while (1)
      {
            temp = l  / div + div;
            div =  temp >>  1;
            div += temp  & 1;
            if  (rslt > div)
                   rslt = (unsigned)div;
            else
            {
                  if (l / rslt == rslt - 1 && l % rslt == 0)
                        rslt--;
                  return rslt;
            }
      }
}
convert it into nasc... or try search more in google.
Thanks! I will try. :P
Xelat is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:02.